Home Page › Forums › Network Management › ZeroShell › How to pass IP to servers from virtual server forwarders › Reply To: How to pass IP to servers from virtual server forwarders
Remove the internal interface from ‘Nat Enabled Interfaces’, and add, in Scripts/Cron, NAT and Virtual Servers script,
iptables -t nat -I POSTROUTING 1 -o internal.iface -s lan.ip addr/mask -d server.private.ip -j MASQUERADE
Assuming your internal network 192.168.12.0/24 on ETH00, and you ‘real’ server ip address 192.168.12.2
iptables -t nat -I POSTROUTING 1 -o ETH00 -s 192.168.12.0/24 -d 192.168.12.2 -j MASQUERADE
enable the script.
This should translate the source ip address (with the lan side ZS ip address) received from the server only if the packets are coming from the inside lan, leaving unchanged packets which arriving from the wan.