where is iptables in ubuntu 16.04? - Ask Ubuntu


i'm reading source code write directly system iptables in /system/xbin/iptables in android. want same in ubuntu without using iptables command.

where iptables located on ubuntu 16.04, followed questions answers doesn't apply on version of ubuntu.

find / -name iptables return /sbin/iptables contains binary , maybe man!

where file iptables command writes to.

iptables stores information in ram, meaning it's non-persistent. if want save/restore @ will, you'll need use couple commands.

first off, use iptables normal set rules way want them. then, can freeze these rules using like:

sudo iptables-save > /etc/iptables.conf 

then, load rules, it's simple matter of running:

sudo iptables-restore < /etc/iptables.conf 

you can add /etc/rc.local or similar have run automatically @ boot, or can have program call executable (or pass same iptables rules on , on again).


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User