How do I remove the double
-A POSTROUTING -j MASQUERADE
line that I have on a Ubuntu server?
This is what I have done:
root@ts:~# iptables -t nat -A POSTROUTING -j MASQUERADE
root@ts:~# sysctl -p /etc/sysctl.conf
net.ipv4.ip_forward = 1
root@ts:~# iptables-save > /etc/iptables.up.rules
root@ts:~# vi /etc/network/interfaces
root@ts:~# iptables-save
# Generated by iptables-save v1.4.10 on Thu Sep 22 18:00:07 2011
*nat
:PREROUTING ACCEPT [184:27845]
:INPUT ACCEPT [32:6346]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -j MASQUERADE
-A POSTROUTING -j MASQUERADE
COMMIT
# Completed on Thu Sep 22 18:00:07 2011
root@ts:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@ts:~#