The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Short answer: Build an allow-list firewall: permit loopback, established and related connections, SSH from a known administration address, and only the application ports your VPS actually serves. Leave required outbound traffic available, drop unsolicited inbound and forwarded traffic, test from a second connection, then persist the rules for both IPv4 and IPv6. A default-drop policy applied before its SSH exception is verified can disconnect you from the server.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
What iptables does on a VPS
iptables is the command-line interface to Linux Netfilter packet filtering and network address translation (NAT). A rule contains packet-matching criteria and a target. The targets you will use most often are ACCEPT, DROP, and RETURN. Rules are evaluated in chains, in order, until a packet is accepted, dropped, returned to a calling chain, or reaches the chain policy.
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
For a host firewall, three built-in chains matter most:
- INPUT handles traffic addressed to the VPS itself, such as an SSH connection or a web request to a local service.
- OUTPUT handles traffic generated by processes on the VPS, such as package downloads, DNS lookups, and API calls.
- FORWARD handles packets routed through the VPS to another interface or network. A normal single-purpose VPS usually does not need to forward traffic.
Filtering is stateful when you use connection tracking. Netfilter remembers the state of a connection, so return packets can be judged in context instead of treated as unrelated new inbound traffic. The userspace conntrack tool can inspect or manage tracked connections when deeper troubleshooting is required.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Decide what the firewall should protect
Separate provider controls from the host firewall
Many VPS platforms offer an external firewall or security-group layer. Use it as a second boundary, but do not assume it replaces rules on the operating system. The provider layer can block traffic before it reaches the machine; iptables can still protect services if a provider rule is changed, a private interface is added, or traffic arrives from an unexpected path. DigitalOcean’s 2023 firewall guidance describes this defense-in-depth approach while recommending a policy that exposes only SSH and explicitly opened application traffic.
Write an inventory before writing commands
List every service, protocol, port, and legitimate source. Do not open a port merely because an application package installed it. The following is a planning worksheet, not a universal rule set.
| Service | Typical protocol and port | Open to | Decision |
|---|---|---|---|
| SSH administration | TCP 22, or your documented alternate port | Your office, VPN, or bastion address | Prefer a narrow source CIDR; never leave administrative access accidental. |
| HTTP | TCP 80 | Internet, if serving web traffic or redirecting to HTTPS | Open only when a web server listens there. |
| HTTPS | TCP 443 | Internet | Open when the application serves TLS directly or through a reverse proxy. |
| DNS server | UDP and TCP 53 | Known clients or the Internet only if you intentionally operate public DNS | Do not expose a recursive resolver unintentionally. |
| Monitoring | Port and protocol depend on the monitoring agent | Monitoring network or collector addresses | Allow the collector, not the whole Internet. |
| VPN | Port depends on the VPN protocol | VPN peers or users | Document both transport and source ranges. |
| Application or database | Port depends on the software | Only the required application tier | Keep private back-end services off public interfaces when possible. |
Also record whether the VPS has a public IPv6 address. IPv4 and IPv6 are separate policy surfaces: iptables manages IPv4, while ip6tables manages IPv6. An IPv4 ruleset does not protect an exposed IPv6 address.
Prevent a remote lockout
Remote firewall changes are riskier than changes made at a local console. Before setting an INPUT or FORWARD policy to DROP, confirm that the matching SSH rule is already present and correct. Keep the current SSH session open, start a second session from an independent client if possible, and have the VPS provider’s out-of-band console available. A restrictive rule set can otherwise drop the connection between an application and its database, or cut off the only administration path.
Use a temporary rollback plan. Schedule a provider console command, a configuration-management rollback, or an out-of-band reboot that restores the previous rules if your test session fails. Never rely on the assumption that a reboot will automatically clear a persistent firewall; a saved ruleset may be loaded again during startup.
Inspect and back up the current rules
Run these commands as root or through sudo:
sudo iptables -L -v -n --line-numbers
sudo iptables -S
sudo iptables-save | sudo tee "$HOME/iptables-backup-$(date +%F-%H%M%S).rules" > /dev/null
sudo ss -tulpn
-L lists chains, -v shows packet and byte counters, -n avoids reverse-DNS lookups, and --line-numbers makes later deletion precise. The -S form prints rules in a command-like format. ss -tulpn shows which processes are actually listening, so you can compare the inventory with reality.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
A newly installed Ubuntu system can show ACCEPT policies and few or no rules. That means packets are not being filtered by this ruleset; an empty-looking listing is not evidence that the VPS is protected.
Build a safe IPv4 baseline
The examples below use the documentation address 203.0.113.44 as the sole SSH source. Replace it with the fixed public address or CIDR of your administration network. If your SSH daemon uses another port, change 22 consistently.
1. Allow loopback and existing connections
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -m conntrack --ctstate INVALID -j DROP
Loopback is required by many local services. The state rule allows replies to connections the VPS initiated and packets belonging to already approved inbound sessions. Dropping invalid states early removes packets that do not match a valid tracked flow.
2. Permit SSH only from the administration source
sudo iptables -A INPUT -p tcp -s 203.0.113.44/32 --dport 22 -m conntrack --ctstate NEW -j ACCEPT
Place this rule before any default DROP policy. The NEW condition limits the exception to connection attempts; established packets are handled by the state rule above. Restricting by source is stronger than exposing SSH to every address, but it requires a recovery plan for changing office or VPN addresses.
Recommended Free Tools
3. Open only the web ports you serve
sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW -j ACCEPT
Remove either port if your service does not use it. If a reverse proxy is the only public listener, keep application and database ports closed and bind those services to a private address or loopback interface.
4. Add narrowly scoped service exceptions
For a monitoring collector at 198.51.100.20, for example:
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
sudo iptables -A INPUT -p tcp -s 198.51.100.20/32 --dport 9100 -m conntrack --ctstate NEW -j ACCEPT
For a deliberately public DNS service, allow both transports:
sudo iptables -A INPUT -p udp --dport 53 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A INPUT -p tcp --dport 53 -m conntrack --ctstate NEW -j ACCEPT
Use source restrictions for private DNS, VPN control, dashboards, databases, and custom APIs. Opening a port in a firewall does not make a service secure; it only makes the listener reachable.
5. Set policies after the exceptions are validated
sudo iptables -P INPUT DROP
sudo iptables -P FORWARD DROP
sudo iptables -P OUTPUT ACCEPT
This common host policy drops unsolicited inbound and routed traffic while leaving outbound traffic available for updates, DNS, telemetry, and application dependencies. If your threat model requires restricted egress, build and test an explicit OUTPUT allow-list instead of changing the policy blindly; blocking DNS, time synchronization, package repositories, or monitoring endpoints can break the system in less obvious ways.
Do not use iptables -F on a production VPS as a shortcut unless you have console access and understand the resulting policy. Flushing rules while the policies are still permissive can expose services; flushing after setting a drop policy can lock you out.
Test the IPv4 policy before saving it
- From the VPS, run
sudo iptables -L -v -n --line-numbersand verify the SSH rule appears above the policy and that packet counters increase when you test. - From the approved administration address, open a new SSH session. Keep the original session active until the new one succeeds.
- From an unapproved network, confirm that SSH is refused or times out while the approved address still connects.
- From an independent client, test only the services you intended to publish, for example
curl -I http://server-addressandcurl -I https://server-address. - From the VPS, verify outbound dependencies such as DNS resolution, package metadata, monitoring, and application APIs.
- Check counters with
sudo iptables -L -v -n. A rule that never increments may be ordered incorrectly, matched the wrong interface, or describe a service that is not receiving traffic.
Use a temporary, specific diagnostic rule rather than replacing the whole policy when troubleshooting. Remove that rule after the test and record the deletion command or line number.
Design the IPv6 rules separately
Repeat the policy with ip6tables if the VPS has IPv6 connectivity. Use an example administration address such as 2001:db8::44/128 only as a template; substitute the real address allocated to your network.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
sudo ip6tables -A INPUT -i lo -j ACCEPT
sudo ip6tables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo ip6tables -A INPUT -m conntrack --ctstate INVALID -j DROP
sudo ip6tables -A INPUT -p tcp -s 2001:db8::44/128 --dport 22 -m conntrack --ctstate NEW -j ACCEPT
sudo ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW -j ACCEPT
sudo ip6tables -P INPUT DROP
sudo ip6tables -P FORWARD DROP
sudo ip6tables -P OUTPUT ACCEPT
IPv6 also depends on ICMPv6 for neighbor discovery, path-MTU discovery, and other control functions. Do not copy an IPv4 habit of blocking all ICMP traffic. Permit the ICMPv6 types required by your network and test from both local and remote IPv6 clients. If you operate a VPN, router, or private IPv6 segment, add its documented control traffic before applying the drop policy.
Inspect IPv6 with sudo ip6tables -L -v -n --line-numbers and verify listeners and routes with ss -6 -tulpn and ip -6 route. A provider may advertise IPv6 even when your application only tests IPv4, so test both address families deliberately.
Persist rules across a reboot
Runtime rules live in kernel memory. A command that works interactively can disappear at reboot unless a service or configuration file restores it. On Ubuntu and Debian systems, one common persistence workflow is the iptables-persistent package and its companion service:
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 →sudo apt update
sudo apt install iptables-persistent
sudo netfilter-persistent save
During installation, choose to save the current IPv4 and IPv6 rules when prompted. The resulting files are commonly /etc/iptables/rules.v4 and /etc/iptables/rules.v6. DigitalOcean’s Ubuntu example uses /etc/iptables/rules.v4; the exact service integration can vary by distribution image, so confirm that your startup mechanism is enabled and that both files contain the rules you tested.
sudo systemctl status netfilter-persistent
sudo iptables-save | sudo tee /etc/iptables/rules.v4 > /dev/null
sudo ip6tables-save | sudo tee /etc/iptables/rules.v6 > /dev/null
Do not edit a saved file and assume the running kernel changed. Load a reviewed file explicitly, or use the distribution service, then inspect the live chains again. Keep dated backups of the files and document the restore commands in your operations runbook.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.iptables, nftables, and ufw: which interface fits?
Ubuntu’s security documentation identifies nftables as the successor to iptables in the Linux Netfilter subsystem. Modern Ubuntu packages can still provide the familiar iptables syntax through an nftables-backed compatibility layer. Check the implementation on a server with iptables --version; output containing nf_tables indicates that compatibility mode is in use.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
| Interface | Abstraction level | IPv4 and IPv6 | Expressiveness | Persistence and migration | Best fit |
|---|---|---|---|---|---|
| Direct iptables/ip6tables | Traditional Netfilter command interface | Separate commands and rulesets | Strong packet matches, chains, counters, NAT, and connection states | Use the distribution’s save/restore service; nft-backed compatibility may affect edge cases | Existing runbooks, granular host policies, and systems that already standardize on iptables syntax |
| nftables | Current native Netfilter framework | Can express both families in one ruleset | Rich sets, maps, chains, and unified rule design | Persist with the distribution’s nftables service and configuration | New deployments that want the successor framework and a single modern ruleset |
| ufw | Simplified frontend | Provides common IPv4/IPv6 policy controls | Less convenient for unusual matches and complex chain logic | Manages its own generated rules and startup integration | Administrators who need a straightforward allow/deny policy rather than raw rule composition |
Choose one control plane for a given host where possible. Mixing hand-written iptables rules, ufw-generated rules, and native nftables configuration without documenting ownership makes ordering and persistence difficult to predict. Direct commands remain useful when you need granular chains or packet conditions; ufw is easier for ordinary host policies; nftables is the forward-looking native framework on current Ubuntu.
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 reinstallCommon failure modes and recovery
SSH stopped immediately after applying the policy
Use the second session or provider console. Set the policy to ACCEPT temporarily, restore the known-good backup, and inspect the source address, port, interface, and rule order:
sudo iptables -P INPUT ACCEPT
sudo iptables-restore < /root/iptables-backup-YYYY-MM-DD-HHMMSS.rules
sudo iptables -L -v -n --line-numbers
If the backup path differs, use the dated file you created. Once access is restored, add the corrected SSH rule, test it from an independent client, and only then reapply the drop policy.
The rule exists but traffic is still blocked
- Check whether an earlier rule drops the packet.
- Confirm the packet is IPv4 or IPv6 and that you edited the corresponding ruleset.
- Verify the service is listening on the expected address and port with
ss -tulpn. - Check the provider firewall, security group, VPS network ACL, and local service configuration.
- Inspect counters and use numeric output so a hostname lookup does not obscure the actual source address.
Web traffic works on IPv4 but not IPv6
Inspect ip6tables, the IPv6 route, DNS AAAA records, and the service’s bind addresses. Add the IPv6 web rules and required ICMPv6 handling; an IPv4 exception cannot match an IPv6 packet.
Rules vanish after reboot
Confirm that the persistence package or native service is installed, enabled, and loading the files you edited. Compare iptables-save before reboot with the post-reboot listing. A manually entered rule is not persistent merely because it appeared in iptables -L.
An application cannot reach its database
Identify the direction and address family of the connection. If both services are on the same VPS, loopback or a local interface may be involved; if the database is on another host, the client’s outbound traffic and the database host’s inbound policy both matter. Add the narrowest required rule at the correct endpoint rather than opening the database port publicly.
Document the finished firewall
Store the inventory, approved source ranges, listening services, IPv4 and IPv6 rules, persistence method, backup location, and rollback procedure together. Record who can change the provider firewall and how to reach the emergency console. After every application deployment or network change, compare listening sockets with the inventory and repeat independent-client tests. A firewall is dependable when its intended traffic, ownership, and recovery path are explicit—not when its rule list is merely long.
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.




