Iptables samples. Very good ways to filter network traffic.

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]…

Read More

How to have iptables entries applied on boot.

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. jason@hoshi:~$ sudo touch /etc/network/if-up.d/iptables [sudo] password for jason:jason@hoshi:~$ sudo touch /etc/network/if-up.d/iptables [sudo] password for jason: Put this in it….

Read More