Reply To: Outbound NAT to a specific IP

Home Page Forums Network Management ZeroShell Outbound NAT to a specific IP Reply To: Outbound NAT to a specific IP

#51454

777maxism
Member

If I understand correctly then this is what you need.
Zahodish (Startup / Krohn) there choose section (NAT and Virtual Servers) and Enable section, insert the rules, change the value of their own, at the end restart Zeroshell.

# incoming rules
iptables -t nat -I PREROUTING 1 -d 9.9.9.1 -i ETH00.771 -j DNAT –to-destination 10.55.0.62
iptables -t nat -I PREROUTING 1 -d 9.9.9.2 -i ETH00.771 -j DNAT –to-destination 10.55.0.57
iptables -t nat -I PREROUTING 1 -d 9.9.9.3 -i ETH00.771 -j DNAT –to-destination 10.55.0.172

# Outgoing rules
iptables -t nat -I POSTROUTING 1 -s 10.55.0.62 -o ETH00.771 -j SNAT –to-source 9.9.9.1
iptables -t nat -I POSTROUTING 1 -s 10.55.0.57 -o ETH00.771 -j SNAT –to-source 9.9.9.2
iptables -t nat -I POSTROUTING 1 -s 10.55.0.172 -o ETH00.771 -j SNAT –to-source 9.9.9.3