Enable iptables on one interface - Server Fault
How to reset iptables to the default settings - Kernel Talks Sep 28, 2017 How-To: Redirecting network traffic to a new IP using IPtables Dec 05, 2008 Enable iptables on one interface - Server Fault iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT But that anything else incoming on eth0 should be dropped. iptables -A INPUT -i eth0 -j DROP For slightly more depth see this CentOS wiki entry. FTP is a trickier than ssh since it can use a random port, so see this previous question. Cisco Nexus 9000 Series NX-OS Programmability Guide
iptables Syntax | iptables: The Linux Firewall
Linux IPTables: How to Add Firewall Rules (With Allow SSH iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT. The above iptables command has the following 4 components. “-A INPUT” – This indicates that we are appending a new rule (or adding) to the INPUT chain. So, this rule is for incoming traffic. Quick HOWTO : Ch14 : Linux Firewalls Using iptables
The iptables-persistent looks for the files rules.v4 and rules.v6 under /etc/iptables. These are just a few simple commands you can use with iptables, which is capable of much more. Read on to check on some of the other options available for more advanced control over iptable rules.
An In-Depth Guide to iptables, the Linux Firewall