linux: redirect port with response« Wróć do listy pytań

redirect to another squid server on diffrent ip
Wysłane przez mrmucha
Zadane przez 29/04/2019 08:04
0

172.16.1.124 – external squid server
172.16.1.210 – server where you need to type this command
3139 – internal squid port
3218 – external squid port

1
2
3
4
5
6
7
8
9
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
iptables -t nat -A PREROUTING -p tcp --dport 3139 -j DNAT --to-destination 172.16.1.124:3128
iptables -t nat -A POSTROUTING -p tcp -d 172.16.1.124 --dport 3128 -j SNAT --to-source 172.16.1.210
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
iptables -t nat -A PREROUTING -p tcp --dport 3139 -j DNAT --to-destination 172.16.1.124:3128
iptables -t nat -A POSTROUTING -p tcp -d 172.16.1.124 --dport 3128 -j SNAT --to-source 172.16.1.210
Wysłane przez mrmucha
Odpowiedziane 29/04/2019 08:07