The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Use sudo iptables -L -v -n --line-numbers to see IPv4 rules in the default filter table, including counters and one-based rule numbers. To remove one rule, identify its chain and position, run sudo iptables -D CHAIN NUMBER, then list the chain again to verify the change. For IPv6, use ip6tables instead. The table, chain, address family and deletion method must all match the rule you intend to change.
What iptables rules represent
iptables is the command-line administration interface for Linux packet filtering and network address translation (NAT) for IPv4. The parallel ip6tables command manages IPv6 rules. The documented command forms are the same for both address families; only the command name changes.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRules are organized into tables and chains. A table contains a particular class of packet-processing rules, while a chain is an ordered list evaluated for traffic entering, leaving or passing through the host. Rule order matters: a packet can match an earlier rule and never reach a later one. A rule number is therefore a position in one specific chain, not a permanent identifier.
Commands operate on one table at a time. If you do not specify a table, iptables uses the filter table. A rule that appears in nat, mangle or raw will not be listed or deleted by a command that is silently using filter.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Run these commands with root privileges, normally by prefixing them with sudo. They change the active kernel ruleset immediately. They do not automatically establish a distribution-wide reboot-persistence configuration.
List the active ruleset
List the default filter table
sudo iptables -L -v -n --line-numbers
This displays the built-in chains in the default filter table and each rule’s position. The output normally includes chain policy, packet and byte counters, protocol, source and destination addresses, interfaces, matches and the target action.
Recommended Free Tools
List one chain
sudo iptables -L INPUT -v -n --line-numbers
Replace INPUT with OUTPUT, FORWARD or a user-defined chain. Restricting the listing to one chain makes it easier to identify a rule before editing and avoids confusing a number in one chain with a number in another.
Understand the listing options
| Option | Purpose | Why it matters when deleting |
|---|---|---|
-L |
Lists rules. | Shows the chain and rules currently loaded in the selected table. |
-v |
Shows verbose information, including counters and additional interface or match details. | Helps distinguish rules that have similar addresses or targets. |
-n |
Prints numeric addresses and ports instead of performing reverse-DNS and service-name lookups. | Produces faster, unambiguous output that is easier to compare with a specification. |
--line-numbers |
Prints one-based positions at the start of each rule. | Supplies the number used by -D chain rulenum. |
Line numbers start at 1, not 0. They are recalculated whenever rules are inserted or removed, so a number you recorded earlier can refer to a different rule later.
Show rules in command-specification form
sudo iptables -S
sudo iptables -S INPUT
The -S form prints rules as command-like specifications, such as an append operation with its matches and target. It is useful for recording the exact active rule before editing, reviewing a configuration, or preparing a specification-based deletion. Add -t TABLE when the rule is not in filter:
sudo iptables -t nat -S
sudo iptables -t nat -S PREROUTING
Use the output from the host itself rather than reconstructing a rule from memory. Option aliases, implicit modules, address formatting and option order can make an assumed specification fail to match the loaded rule.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
List rules in a particular table
The table must be selected consistently for both listing and deletion. The following commands list all chains in commonly used tables:
| Table | List command | Typical role |
|---|---|---|
filter |
sudo iptables -t filter -L -v -n --line-numbers |
Packet filtering. This is the default table when -t is omitted. |
nat |
sudo iptables -t nat -L -v -n --line-numbers |
Network address translation and related first-packet decisions. |
mangle |
sudo iptables -t mangle -L -v -n --line-numbers |
Packet alterations and specialized marking or header handling. |
raw |
sudo iptables -t raw -L -v -n --line-numbers |
Early packet handling before later connection-tracking processing. |
Only query tables that exist and are relevant on the host. A failed or empty-looking query can indicate that you selected the wrong table, chain or address family rather than that the rule has disappeared.
List IPv6 firewall rules
IPv4 and IPv6 rules are maintained separately. Listing IPv4 rules does not show IPv6 rules, even when the same service and port are involved.
sudo ip6tables -L -v -n --line-numbers
sudo ip6tables -L INPUT -v -n --line-numbers
Use the corresponding table option for IPv6 tables, for example:
sudo ip6tables -t nat -L -v -n --line-numbers
Do not use an IPv4 address or an iptables rule specification with ip6tables. Confirm the address family first, then inspect the matching command’s output.
Delete one rule by its number
Deleting by number is usually the clearest method for a one-time change. It targets exactly one position in one chain and table, provided you list the chain immediately before deleting it.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
- Identify the table and address family. Decide whether the rule belongs to IPv4 or IPv6 and whether it is in
filter,nat,mangleorraw. - Record the active specification. Run
sudo iptables -S, or add the same-t TABLEoption for a non-default table. This gives you a recovery reference if the change has an unintended effect. - List the exact chain with numbers. For example,
sudo iptables -L INPUT -v -n --line-numbers. - Check the complete row. Confirm the source, destination, protocol, ports, interfaces, match conditions and target. Do not rely on the number alone.
- Delete the selected position. If the row is number 3 in
INPUT, run:
sudo iptables -D INPUT 3
For a rule in another table, include the table option:
sudo iptables -t nat -D PREROUTING 2
For IPv6, use the same syntax with ip6tables:
sudo ip6tables -D INPUT 3
- List the chain again. Run the same listing command and verify that the intended row is gone and that the remaining order is what you expect.
- Test the affected traffic path. Check the service or connection that the rule controlled. A successful command only means that the kernel accepted the deletion; it does not prove that the resulting policy is correct.
When deleting several rules, repeat the listing before each deletion. Removing one entry shifts every later position, so deleting an old sequence of numbers can remove the wrong rules.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Delete a rule by its complete specification
You can delete by repeating the rule’s match and target instead of counting its position. Replace the original append operation’s -A with -D:
sudo iptables -D INPUT -s 203.0.113.10 -p tcp --dport 22 -j DROP
The deletion syntax must contain the same options as the corresponding rule-creation command. If the rule was inserted with -I or replaced with -R, the match and target still need to describe the loaded rule accurately; deletion is not a broad search for similar-looking entries.
Specification deletion is useful when you have a saved configuration or want a command that documents what is being removed. Its precision depends on reproducing the active form exactly. Capture it first with:
sudo iptables -S INPUT
Then adapt the displayed rule by changing the operation to -D and execute it with the same table option, if any.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
If identical rules occur more than once, a specification-based deletion removes the first matching entry. Re-list the chain after each deletion when duplicates are possible. To remove a particular duplicate reliably, use the current line number.
Choose the right deletion method
| Method | Precision and auditability | Main risk | Best use |
|---|---|---|---|
-D CHAIN NUMBER |
Targets one current position; the number is visible in the numbered listing. | The position changes after another rule is added or removed. | A single, deliberate edit after an immediate inspection. |
-D CHAIN followed by the full rule specification |
Describes the match and target explicitly and can be copied from -S. |
Fails if the options do not exactly match; with duplicates, removes the first match. | Repeatable, documented changes where the active specification is available. |
-F CHAIN |
Removes every rule in the named chain. | Large blast radius; all rules in that chain are lost. | Only when clearing the entire chain is intentional. |
-F with a table |
Removes rules from every chain in the selected table. | Can disable an entire table’s rules at once. | Controlled resets or rebuilding a table from a known configuration. |
For normal troubleshooting, prefer a single numbered or specification-based deletion. Flushing is not a safer version of deleting one rule; it is a fundamentally broader operation.
Flush rules and remove user-defined chains
Flush one chain
sudo iptables -F INPUT
-F flushes every rule from the selected chain. It does not mean “delete the rule I just inspected”; it means remove all rules in that chain.
Flush every chain in one table
sudo iptables -t nat -F
When no chain is named, -F flushes every chain in the selected table. Omitting -t selects the default filter table. The operation is equivalent to deleting the rules one by one from the selected scope, but it has a much greater operational impact.
Delete a user-defined chain
sudo iptables -X CHAIN_NAME
-X removes a user-defined chain only after it is empty and no rules refer to it. Flush the chain first if appropriate, then remove references to it from other chains before attempting -X. Built-in chains such as INPUT, OUTPUT and FORWARD are not ordinary user-defined chains and cannot be removed this way.
Verification and troubleshooting
The rule still appears
- List the same chain with
--line-numbersand confirm that you deleted the intended row. - Check the table. A rule in
natremains visible there even after you changefilter. - Check the address family. An IPv6 rule requires
ip6tables. - Check whether an identical duplicate exists. Specification deletion removes one matching entry at a time.
The numbered deletion removed the wrong rule
This usually means the chain changed between listing and deletion, or the number was taken from a different chain. Re-list the exact chain immediately before editing, compare the full row, and delete again only after confirming the current position. If another administrator or service is changing rules concurrently, coordinate the edit or use a controlled maintenance window.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Specification deletion reports no matching rule
Run sudo iptables -S CHAIN and compare the displayed rule character by character with the deletion command. Pay attention to source and destination notation, protocol, port options, interfaces, negation, match modules and the target. Include the original table option. A rule that looks equivalent to a person may not be an exact match to the command parser.
The output is slow or displays names
Use -n to suppress reverse-DNS and service-name lookups. Numeric output is also easier to save and compare when you are auditing a change.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsThe command says permission is denied
Run it with an account that has the required administrative privileges, normally through sudo. If sudo itself is unavailable, obtain authorized root access rather than trying to edit firewall state as an unprivileged user.
Connectivity is lost after deletion
Re-list the affected chain and compare it with the specification you recorded before editing. A removed ACCEPT rule can expose a later drop or reject rule; a removed drop rule can expose a service that was intentionally restricted. Restore the recorded rule with the appropriate insertion or append operation if the change was incorrect, then verify the resulting order.
Make a change survive a reboot
The iptables and ip6tables commands modify the active ruleset. The command manuals do not define one universal persistence mechanism for every Linux distribution. Whether rules survive a reboot depends on the host’s distribution, installed firewall tooling and local service configuration.
Before relying on a deletion, determine how that machine loads firewall rules at boot. Update the same distribution-specific persistence source that originally installed the rule, or the rule may return after a restart. Verify both the live ruleset and the persisted configuration; changing only one creates a misleading temporary fix.
Free tools Windows power users keep installed
One-click scans. No signup required.
A repeatable safe workflow
- Define scope: IPv4 or IPv6, table, chain and the traffic behavior you intend to change.
- Save the current form: use
iptables -Sorip6tables -S, adding-t TABLEwhere necessary. - Inspect with numbers: use
-L -v -n --line-numberson the exact chain. - Choose the narrowest operation: delete one number for an unambiguous current position, or delete an exact specification copied from
-S. - Execute with matching scope: preserve the command family, table and chain.
- Re-list and compare: confirm that only the intended rule changed and that rule order is correct.
- Exercise the traffic path: test the service, source or destination affected by the rule.
- Update persistence: if the change must survive reboot, modify the host’s established persistence mechanism.
Command reference
| Goal | Command |
|---|---|
| List IPv4 filter rules with counters and numbers | sudo iptables -L -v -n --line-numbers |
| List one IPv4 chain | sudo iptables -L INPUT -v -n --line-numbers |
| Show IPv4 rules as specifications | sudo iptables -S |
| List a non-default table | sudo iptables -t nat -L -v -n --line-numbers |
| Delete rule 3 from IPv4 INPUT | sudo iptables -D INPUT 3 |
| Delete rule 2 from IPv4 nat PREROUTING | sudo iptables -t nat -D PREROUTING 2 |
| Delete by IPv4 specification | sudo iptables -D INPUT -s 203.0.113.10 -p tcp --dport 22 -j DROP |
| List IPv6 filter rules | sudo ip6tables -L -v -n --line-numbers |
| Delete IPv6 rule 3 from INPUT | sudo ip6tables -D INPUT 3 |
| Flush one chain | sudo iptables -F INPUT |
| Flush a complete table | sudo iptables -t nat -F |
| Remove an empty user-defined chain | sudo iptables -X CHAIN_NAME |
Version context
The Linux netfilter manual page identified for this guide documents iptables version 1.8.13 and was current on October 15, 2026. Distribution packages can expose different build details or related firewall front ends, so confirm the command behavior and active rule owner on the specific host before making a production change.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

