Skip to contentSkip to conversation

Destination NAT

DISCUSSION Sathi 1 participant 1 message Mar 14, 2003

lore
Share & tools
lore

Sathi

author
#0 lore raw

Hello All,

I am running squid as reverse proxy and its working fine.

Now i need to set iptables rules to forward ftp ports directly to backend server for file upload.

I set in prerouting rule as

/sbin/iptables -t nat -A PREROUTING -p tcp --dport 20 -d 172.16.1.10 -j DNAT --to 172.16.1.25 /sbin/iptables -t nat -A PREROUTING -p tcp --dport 21 -d 172.16.1.10 -j DNAT --to 172.16.1.25

Note: Reverse proxy and backend servers are running in same network.and by reverse proxy has only one network interface.

but i was not able to connect to backend server.

In tcpdump i can see a request from client to squid server but it is not forwarding to backend server.

What is the correct rule to forward the ftp ports to backend server.

Regards,
Sathi