I get the ports as a variable and I need to delete the rule in nftables. If the port is present in rule then i would grep the handle number and delete the rule. But in nftables service name would be present in rule so how can I delete the rule. Is there any way to find the what port belongs to service or any other way to delete the nftable rule other than handle or any other suggestions ??
Rule management in nftables
427 Views Asked by infantus At
1
There are 1 best solutions below
Related Questions in SHELL
- macOS - Most secure way of a GUI SUDO_ASKPASS
- When does Bash read heredocs?
- Why `set -o pipefail` gives different output even though the pipe is not failing
- Run multiple shell scripts in Dockerfile
- Alias does not take effect when I use Vim to execute external commands
- why variable substitution is so different?
- Error: fish: ${ is not a valid variable in fish
- Custom Bash functions & custom statements - Need some advice
- unexpected operator == in square brackets when trying to use gum lib
- Delete first three lines containing a certain word
- Keep the log for the last 14 days
- Iterate over items in one array and groups of items in second array
- Keep multi-version of a static-lib like what we do for shared-libs
- How to write function in bash for reuse shell commands inside using osascript?
- Why is it that when I pass certain directory names to `ls`, sometimes it does not list their contents?
Related Questions in SERVICE
- Why does Angular ^17 have problems with my modules, services, etc
- Problem with Android App background service stoping
- How to use interceptors with services in nestjs
- Exchange data between a Windows service and an application
- Unable to resolve service name to its IP inside kubernetes cluster
- Self Hosted Agent service startup getting failed on VM restart
- Linux service stops logging
- Disable/Enable OSB proxy service via WLST
- Write rows on destination even when an error occurs?
- paho mqtt java cannot reconnect after a long time machine sleep
- IServiceCollectionConfigurator' does not contain a definition for 'UsingRabbitMq'
- "setOngoing(true)" Notification dismissed by user
- How to run powershell command in OnStart of ServiceBase Class in C#?
- Is there any way to globally override Android's back button click?
- Terraform Azure Provider: Authenticating using a Service Principal with a Client Certificate
Related Questions in SH
- Bitbucket pipeline script failure
- what is the role of the backslash in this command why it is used and the dollar sign?
- Script shell execution failing escaping problem
- Shell script appending filenames more than once?
- How to ensure proper order of single command outputs in a Linux shell (dash, bash) script run by Textadept F5?
- How to write shell script on website login
- BASH - Read - How to require [enter] to complete input? Example [y] + [enter]
- Dinamic Table in Bash (Shell)
- Bash script that goes trough folder and uses dd
- How i can set swarm environment variables in the kafka-ui docker image
- Capturing first line from shell command output and continue processing rest
- Jenkinsfile. I want to use objects. How to run shell script from method of object?
- Convert a file of decimal numbers to the ASCII equivalent
- unable to set permission read and write to volumes directory in macos 10.15
- How i can embed my script into the image kafka-ui
Related Questions in HANDLE
- Reading register from descriptor file
- Why I when i want clear description in object it cannot
- About TBitmap->Canvas->Handle and HandleAllocated() in C++ Builder
- How can i use a geoaxes to plot some geography data when a uitree callback is triggered?
- What is the difference between an anonymous function and a function handle in MATLAB?
- Exception not handled by Middleware in .NET 8 Web API
- Perl program on Strawberry on Windows needs "use POSIX" in order to evaluate <$sock> and read a packet from the port
- Set correct file size on handle opened with `FILE_FLAG_NO_BUFFERING` without clsoing and reopening the file?
- File handle leak in windows while executing java file
- Convert tradingview heiken ashi with ema to Mql5
- How to release java objects from memory using releaseJavaObject() function
- Livewire form not working when page is visited through wire:navigate
- Handle leak when running c# scripts
- react-grid-layout resizableHandles don't work properly
- Show progress bar in C# console application's taskbar button
Related Questions in NFTABLES
- Why is ingress packet not getting DNAT 'edin NAT PREROUTING chain with nftables?
- Redirect Outbound Traffic to Remote TCP Transparent Proxy
- Install docker on RHEL 8.8. Service does not start because of error : "Failed to initialize nft: Protocol not supported"
- How to make local packets go through nat / prerouting (they go directly to filter / input)
- Netfilter Netdev ingress hook, skb->data point to packet(L3) and not to frame(L2)
- Compile nftables examples
- Netfilter - segfault in libnftables.so.1.0.0
- Why can my Golang app inside docker container only connect to another server if using FQDN in URL?
- Docker.com's IPv4 always changing - Why?
- Troubleshooting NFTables Table Creation with Go
- nftables.conf with set and rules
- script to automatically update blockips table in nftable
- Atomically deleting nftables chains fails in some cases
- Need help using nftables to drop SNMP packets containing a specific community string
- How can I read all incoming traffic that should get redirected by TPROXY?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Ports and service name are listed in /etc/services.
You can force the listing to use numeric ports by
I don't know the use case but a better solution may be achieved by using named sets, from which elements can be easily removed.