Squid with mikrotik router
Posted: Sat Oct 26, 2013 11:04 am
I tried to connect squid3 in my network to use high anonymity proxy. This is how my network is right now
after this setup I changed squid.conf in Ubuntu server as
1. http_port 8080
2. acl localhost src xxx.xxx.xxx.xxx(Ubuntu server IP)
3 acl to_localhost dst xxx.xxx.xxx.xxx(Mikrotik router gateway) I assume that redirected http from Mikrotik router will be redirect again to Mikrotik router.
4. uncomment access log /var/log/squid3/access.log
5. add visible_hostname myname
save squid.conf and restart squid3 server.
Then I have added nat rule in Mikrotik router
ip/firewall/nat
now I can not able to access internet from client1 system, If I remove these two nat rule then I can access internet. what is wrong I have made?
Code: Select all
WAN LINK
|
------------- ---------------------------
| Mikrotik Box | | Ubuntu Server with squid3 |
------------- ----------------------------
| /
| /
----------------------
| Switch ( Cheap one ) |
----------------------
| | |
Client1 Client2 Client3 etc.
1. http_port 8080
2. acl localhost src xxx.xxx.xxx.xxx(Ubuntu server IP)
3 acl to_localhost dst xxx.xxx.xxx.xxx(Mikrotik router gateway) I assume that redirected http from Mikrotik router will be redirect again to Mikrotik router.
4. uncomment access log /var/log/squid3/access.log
5. add visible_hostname myname
save squid.conf and restart squid3 server.
Then I have added nat rule in Mikrotik router
ip/firewall/nat
Code: Select all
1. add chain=dstnat src_address=xxx.xxx.xxx.xxx(ununtu server IP) dst-port=80 protocol=tcp action=accept
2. add chain=dstnat src_address=xxx.xxx.xxx.xxx/28(LAN address) dst-port=80 protocol=tcp action=dst-nat to-address=xxx.xxx.xxx.xxx(ununtu server IP) to-port=8080