cbq.init and iptables NAT routing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3 Oct 2002, Cedric Blancher wrote:
>
> Imho, you must have set up your eth0 rule with SNAT address, which does
> not work, as explained below.

Here's the portion of my iptables script which sets up NAT.  Maybe you can
gleam something more from this.  It should be noted that I'm not using NAT
for security purposes, and I have it set up so my local public subnet can
see the NAT addresses.

iptables -t nat -A PREROUTING -i eth0 -d 64.251.69.2 -j DNAT --to 10.102.106.2
iptables -t nat -A POSTROUTING -o eth0 -s 10.102.106.2 -j SNAT --to 64.251.69.2
iptables -t nat -A PREROUTING -i eth0 -d 64.251.69.3 -j DNAT --to 10.101.106.2
iptables -t nat -A POSTROUTING -o eth0 -s 10.101.106.2 -j SNAT --to 64.251.69.3

iptables -t nat -A POSTROUTING -o eth0 -s 10.101.104.0/21 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -s 10.102.104.0/21 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -s 10.103.104.0/21 -j MASQUERADE


-- 
Aaron Clausen




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux