Sample Iptables configurations A sample iptables output that I am using on an OpenVPN server to allow Internet traffic to be passed through it. ubuntu ~ $ sudo iptables-save # Generated by iptables-save v1.4.21 on Wed Aug 2 22:19:48 2017 *filter :INPUT ACCEPT [2654934:1228315333] :FORWARD ACCEPT [31023:17433690] :OUTPUT ACCEPT [2475842:555885003] COMMIT # Completed on Wed …

The iptables entries are lost upon reboot with a standard configuration, but this can be applied on boot with the right script. Create a script in the /etc/network/if-up.d directory named iptables. Put this in it. #!/bin/sh iptables-restore < /etc/iptables.conf#!/bin/sh iptables-restore < /etc/iptables.conf Then create the iptables.conf file in the /etc directory and put your iptables …

The iptables -L or iptables –list commands will list all of the iptables rules that are set on your Linux machine. Below is abbreviated output of this command on my Fedora 20 system. [[email protected] homer]# iptables –list Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all — anywhere anywhere ctstate RELATED,ESTABLISHED ACCEPT all …