/usr/share/doc/iptables/html
NameSizeModeActions
NAT-HOWTO-1.html11520644editdlrm
NAT-HOWTO-2.html43460644editdlrm
NAT-HOWTO-3.html14440644editdlrm
NAT-HOWTO-4.html44000644editdlrm
NAT-HOWTO-5.html51390644editdlrm
NAT-HOWTO-6.html83970644editdlrm
NAT-HOWTO-7.html13240644editdlrm
NAT-HOWTO-8.html11360644editdlrm
NAT-HOWTO-9.html20910644editdlrm
NAT-HOWTO-10.html25250644editdlrm
NAT-HOWTO-11.html9100644editdlrm
NAT-HOWTO.html26660644editdlrm
netfilter-extensions-HOWTO-1.html21020644editdlrm
netfilter-extensions-HOWTO-2.html78070644editdlrm
netfilter-extensions-HOWTO-3.html289690644editdlrm
netfilter-extensions-HOWTO-4.html125480644editdlrm
netfilter-extensions-HOWTO-5.html70410644editdlrm
netfilter-extensions-HOWTO-6.html112420644editdlrm
netfilter-extensions-HOWTO-7.html21880644editdlrm
netfilter-extensions-HOWTO-8.html10210644editdlrm
netfilter-extensions-HOWTO-9.html22220644editdlrm
netfilter-extensions-HOWTO.html72670644editdlrm
netfilter-hacking-HOWTO-1.html74740644editdlrm
netfilter-hacking-HOWTO-2.html17180644editdlrm
netfilter-hacking-HOWTO-3.html80380644editdlrm
netfilter-hacking-HOWTO-4.html533380644editdlrm
netfilter-hacking-HOWTO-5.html10560644editdlrm
netfilter-hacking-HOWTO-6.html30280644editdlrm
netfilter-hacking-HOWTO-7.html92880644editdlrm
netfilter-hacking-HOWTO-8.html52340644editdlrm
netfilter-hacking-HOWTO-9.html8350644editdlrm
netfilter-hacking-HOWTO.html38110644editdlrm
packet-filtering-HOWTO-1.html18910644editdlrm
packet-filtering-HOWTO-2.html15930644editdlrm
packet-filtering-HOWTO-3.html57750644editdlrm
packet-filtering-HOWTO-4.html21890644editdlrm
packet-filtering-HOWTO-5.html16440644editdlrm
packet-filtering-HOWTO-6.html35050644editdlrm
packet-filtering-HOWTO-7.html356160644editdlrm
packet-filtering-HOWTO-8.html14570644editdlrm
packet-filtering-HOWTO-9.html23330644editdlrm
packet-filtering-HOWTO-10.html25750644editdlrm
packet-filtering-HOWTO-11.html37420644editdlrm
packet-filtering-HOWTO.html28310644editdlrm
Edit: /usr/share/doc/iptables/html/NAT-HOWTO-9.html (2091B)
Linux 2.4 NAT HOWTO: Source NAT and Routing Next Previous Contents

9. Source NAT and Routing

If you are doing SNAT, you will want to make sure that every machine the SNAT'ed packets goes to will send replies back to the NAT box. For example, if you are mapping some outgoing packets onto the source address 1.2.3.4, then the outside router must know that it is to send reply packets (which will have destination 1.2.3.4) back to this box. This can be done in the following ways:

  1. If you are doing SNAT onto the box's own address (for which routing and everything already works), you don't need to do anything.
  2. If you are doing SNAT onto an unused address on the local LAN (for example, you're mapping onto 1.2.3.99, a free IP on your 1.2.3.0/24 network), your NAT box will need to respond to ARP requests for that address as well as its own: the easiest way to do this is create an IP alias, e.g.:
    # ip address add 1.2.3.99 dev eth0
    
  3. If you are doing SNAT onto a completely different address, you will have to ensure that the machines the SNAT packets will hit will route this address back to the NAT box. This is already achieved if the NAT box is their default gateway, otherwise you will need to advertise a route (if running a routing protocol) or manually add routes to each machine involved.


Next Previous Contents