Reply To: NAT Pool

Home Page Forums Network Management ZeroShell NAT Pool Reply To: NAT Pool

#53749

horcsct
Member

@redfive wrote:

I didn’t fully understand, but maybe, assuming your internal network 10.0.0.0/26, and the ETH01 as wan interface… don’t set any nat via gui, and in Nat and Virtual Servers script, add something like
iptables -t nat -A POSTROUTING -o ETH01 -s 10.0.0.0/27 -j DNAT –to-source 192.168.96.65
iptables -t nat -A POSTROUTING -o ETH01 -s 10.0.0.32/27 -j DNAT –to-source 192.168.96.66
First rule should translate the range 10.0.0.0/27 to 192.168.96.65 ip address, while the second one, should translate the range 10.0.0.32/27 to 192.168.96.66 ip address.
Regards

Dear redfive,
I think, I need pool-to-pool network translation (Dynamic NAT) as below:
iptables -t nat -A POSTROUTING -o ETH01 -s 192.168.110.0/24 -j SNAT –to-source 192.168.98.66-192.168.98.125

local: 192.168.110.0/24
public: 192.168.98.66-192.168.98.125 (ETH01)

http://thejimmahknows.com/nat-dynamic-nat-nat-overloadingmasquerade-with-iptables/

Thanks.