1

How I can use multiple IP addresses that I've added to my NIC to send different requests to different servers?
For example, my IP address is:

10.0.0.4 

I've added two more IP addresses to my NIC:

10.0.0.5
10.0.0.6 

My question is, how can I split the requests? For example, use 10.0.0.5 to browse the internet only, and use 10.0.0.6 to download an application from terminal. (Using command-line or a python script)

3

The software which sends request can probably bind to a specified address ,look at the parameters or config file

If you are using socket.create_connection() , the last parameter is source_address

https://serverfault.com/questions/496731/how-to-set-which-ip-to-use-for-a-http-request

wget --bind-address=10.0.0.6 

For browsing internet, the source ip is determined by routing parameter preferred source , but that is a networking question i could not find any answers on how to change.

0

for browser, setup squid proxy server and enter proxy ip(10.0.0.5) with port number into browser.

sudo apt-get install squid3

http_access allow test_network

acl test_network src 10.0.0.5

sudo service squid3 restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.