AnswerBun.com

Iptables chain doesn't save

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?

Ask Ubuntu Asked by jogarcia on January 3, 2021

1 Answers

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!

Related Questions

Ubuntu functioning as display adapter

0  Asked on January 22, 2021 by richard-boekamp

     

Completely remove openssl dev version

2  Asked on January 21, 2021 by goelakash

         

What replaced mail-stack-delivery?

1  Asked on January 20, 2021 by isagalaev

     

How to run a .sh file in terminal on login

2  Asked on January 19, 2021 by user2662920

       

SFTP Access to multiple directories for different groups

1  Asked on January 19, 2021 by balab

       

Wine post installation errors in Ubuntu 20.04 LTS

1  Asked on January 19, 2021 by muhammad-asraf-ahmed-imon

   

Error in make install: “cannot copy file”

2  Asked on January 19, 2021 by lmbano-ivn-lpez-coello

 

How to disable TLS 1.0, TLS 1.1 on Apache

3  Asked on January 18, 2021 by eranga-kapukotuwa

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.