iptables forwarding not working/iptables-save not saving

Chuck Anderson cra at WPI.EDU
Thu Nov 20 20:33:34 UTC 2008


On Thu, Nov 20, 2008 at 12:26:26PM -0800, Antonio Olivares wrote:
> Sorry for double post :(  Yahoo mail was misbehaving :(  
> Here's some info to clarify things 
> 
> [root at localhost ~]# service iptables stop

> [root at localhost ~]# iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT [1]+  Done                    gedit /etc/sysconfig/iptables       
> [root at localhost ~]# iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT                                                         
> [root at localhost ~]# iptables -A POSTROUTING -t nat -s 192.168.1.0/24 -o eth0 -j SNAT --to-source 10.154.19.210                                         
> [root at localhost ~]# iptables-save
> # Generated by iptables-save v1.4.1.1 on Thu Nov 20 13:14:50 2008

The output of "iptables-save" goes to your terminal, it isn't 
stored anywhere.

> The iptables get back to original state.  error in iptables-save ?/bug

Nope, you need to do this instead:

service iptables save




More information about the test mailing list