Squid proxy Server with multiple IP
By Fahad Ahammed
- 2 minutes read - 262 wordsMy dear readers. I am here again for your help with squid proxy server. I will show you today how to use squid server to work with several IP in a vps/system. This is very useful if you do Craigslist work or something like that. Proxy is interesting. Squid proxy is like a Swiss Army Knife which has numerous feature to make you comfortable with proxy.
Here are two ways of configuring squid’s proxy to use the other IPs assigned to your server (besides the default one).
Before that you will have to add below codes to ensure those works. IPs are as an example, and you will change it according to yours. But you will have to make sure that IPs ends with “/0”
Method 1 – Use Incoming IP
Basically, if you connect to 192.168.1.101, your outgoing IP will be, 192.168.1.101. The same goes for 192.168.1.102 and 192.168.1.103.
The acl rules checks if myip (connected to IP) matches the IP listed.
The tcp_outgoing_address lines set the IP if the enabled* rule is set.
Method 2 – Per User
If you wish to assign a specific user a designated IP, you can do it with the following rules.
Other Squid Configuration
If you want to designate an IP besides the default IP on the server with squid, you can use this rule:
After you edit the configuration file for squid, don’t forget to reload the rules:
or You can restart the proxy server too.
That is it. I hope you will find these ok. Comment below if you have further question.