Tag: iptables

Forward Ports Through a Linux Gateway with iptables NAT

Why Your Port Forwarding Isn’t Working A very common mistake with port forwarding on Linux is assuming a single DNAT rule is enough. You add one iptables rule, try to hit your server from outside, and… nothing. In reality, proper forwarding through a Linux gateway needs three things working together: IP forwarding in the kernel, packet filtering rules in the…

Read More »

iptables vs ufw: How They Work Together on Ubuntu

Before and After: Fighting the Firewall Beast Before: you SSH into your Ubuntu server, start reading about iptables, get hit with words like chains and policies, and five minutes later you’re staring at a command that might lock you out of your own box. After: you use ufw with a few simple commands, knowing it’s just talking to iptables for…

Read More »