Bob
Bob

Reputation: 107

How use squid to change IP?

I have VPS server with 1 main IP and 2 additional FO IP's. I download 'squid' package to manage my IP addresses. I edited /etc/squid/squid.conf and I added lines (tutorial: https://tastyplacement.com/squid-proxy-multiple-outgoing-ip-addresses):

acl tasty3128 myportname 3128 src 51.75.50.116/24
http_access allow tasty3128
tcp_outgoing_address 51.75.50.116 tasty3128

acl tasty3129 myportname 3129 src 54.38.50.208/24
http_access allow tasty3129
tcp_outgoing_address 54.38.50.208 tasty3129

http_port 51.75.50.116:3128 name=3128
http_port 54.38.50.208:3129 name=3129

How can I use this 'squid' config? Where I can pass argument to use tasty3128 IP? I looking info about this and everybody talking about configuration, not executed. In future I wanna manage IP's by Python script (or another script executed by Python).

Upvotes: 0

Views: 2041

Answers (1)

Shervin Hariri
Shervin Hariri

Reputation: 105

Your code exactly is true but the order of lines is not True;

In your squid.conf :

  • First configure : http_port 51.75.50.116:3128 name=3128
  • Then configure : acl tasty3128 myportname 3128 src 51.75.50.116/24 and so on .

Upvotes: 1

Related Questions