To configure a masquerade rule you construct a rule very similar to a firewall forwarding rule, but with special options that tell the kernel to masquerade the datagram. The ipfwadm command uses the -m option, ipchains uses -j MASQ, and iptables uses -j MASQUERADE to indicate that datagrams matching the rule specification should be masqueraded.

An In-Depth Guide to iptables, the Linux Firewall Aug 29, 2017 Linux Network Administrator's Guide, 2nd Edition: Chapter iptables: how to delete postrouting rule? - Stack Overflow I would like to delete POSTROUTING rule below, [root@hostname ~]# service iptables status Table: nat Chain PREROUTING (policy ACCEPT) num target prot opt source destination Chain POSTROUTING (policy ACCEPT) num target prot opt source destination 1 MASQUERADE all -- 192.168.1.0/24 0.0.0.0/0 Chain OUTPUT (policy ACCEPT) num target prot opt source destination 7.4. FORWARD and NAT Rules Red Hat Enterprise Linux 4

How to Set up Port Forwarding with iptables | Ivo Berger

Masquerade - iptables - LinuxQuestions.org Jun 08, 2003

Aug 29, 2014 · Posted September 8, 2014 By asb. To enable IP forwarding, uncomment this line in /etc/sysctl.conf $ cat /etc/sysctl.conf | grep ip_forward #net.ipv4.ip_forward=1 View 1 response to this answer on our full site

Jun 06, 2010 · iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source server_ip service iptables (I have replaced the server_ip with the server's IP address) But that didn't helped iptables: the command line utility for configuring the kernel-t nat : select table "nat" for configuration of NAT rules.-A POSTROUTING : Append a rule to the POSTROUTING chain (-A stands for "append").-o eth1 : this rule is valid for packets that leave on the second network interface (-o stands for "output")-j MASQUERADE iptables is a pure packet filter when using the default 'filter' table, with optional extension modules. This should simplify much of the previous confusion over the combination of IP masquerading and packet filtering seen previously. iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE. If your default iptables OUTPUT value is not ACCEPT, you will also need a line like: iptables -A OUTPUT -o tun+ -j ACCEPT. That's it now restart the iptables service and you are finished.