Notifications
Clear all
BugOverflow
2
Posty
1
Users
0
Reactions
1,693
Widok
0
29/04/2019 9:04 am
Topic starter
redirect to another squid server on diffrent ip
2 Answers
0
29/04/2019 9:07 am
Topic starter
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
0
03/09/2019 5:18 pm
Topic starter
echo 1 > /proc/sys/net/ipv4/ip_forward iptables -F iptables -t nat -F iptables -X iptables -t nat -A PREROUTING -p tcp --dport 3128 -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