TransWikia.com

Iptables chain doesn't save

Ask Ubuntu Asked by jogarcia on January 3, 2021

Am adding a chain of rules to redirect the outgoing traffic thru my redsocks service. The problem is that it doesnt appears to be saving it or at least when i execute the command:
sudo iptables -nL it doesn’t shows but the create command isn’t failing.

iptables chain create command:

sudo iptables -t nat -N REDSOCKS

If i execute the command sudo iptables -S REDSOCKS I get an error saying that the chain doesn’t exists, however if i execute the iptables chain create command again I get an error saying that the chain already exists.

How can i see this chain and what is inside of it? Or how can i know if it’s saving?

One Answer

You need to keep track of which table has which chain. You created the REDSOCKS chain within the nat table, so you would need to specify that when you want to list the rules. So, instead of this:

sudo iptables -nL

do this:

sudo iptables -t nat -nL

Correct answer by Doug Smythies on January 3, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP