Is it possible to specify the client's IP address (i.e. the source network interface, like eth0, eth0:0, eth0:1...) to which apt-get should bind when it has to connect to the network (for instance installing updates)?

I didn't find anything in the apt-get man's page.


apt-get does not have this functionality, as it really does not (and IMHO should not) care about this. It will use your default gateway, you can change this in a few ways, one is the route command:

sudo route add default gw [gateway IP] dev [device name]

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.