Re: NAT WAN IP to internal range?

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

 



Thanks Vignesh!

>iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o $WANIF -j SNAT --to-source a.b.c.241
>Here I am assuming that 192.168.1.0/24 is your internal network and you want to allow all the machines. If you want to allow only a few machines, put a comma separated "address[/mask]" list.

Solved it for me... in the end I used:
iptables -t nat -I POSTROUTING -s 192.168.1.96/27 -o ppp0 -j SNAT
--to-source a.b.c.241
and matched the range to my DHCP leases. (96 to 127)

Cheers,
Andrew
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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