In my network i want to forward port from Proxy to the Server,
so firewall will can reach its HTTP port, as in Firewall the forward is disabled.
It look like it Internet Router > Firewall > Proxy > Server
-> Router 10.0.1.1 <-> 10.0.1.2 Firewall ->
-> Firewall 10.0.2.1 <-> 10.0.2.2 Proxy ->
-> Proxy 10.0.3.1 <-> 10.0.3.2 Server
Firewall can connect to Proxy, but not to the Server as routing and forwarding are disabled.
I want router to connect to Proxy:80 and it to be forwarded to Server:80
i've tried this rules in "Proxy" but doesn't work
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 10.0.3.2:80
iptables -t nat -A POSTROUTING -p tcp -d 10.0.3.2 --dport 80 -j SNAT --to-source 10.0.2.1
any suggestions?