Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a new interface eth0:1 and assigned IP address using a DHCP server. Now, I want my applications to use the internet of this new interface created. I am doing this because in our Institute, we have a bandwidth limit on each IP address.

Now, I want to do something like:

If I try to use localhost:3129 as a proxy, this traffic gets forwarded to eth0:1 interface. How can I do so?

So that by using localhost:3129, i can actually use my interface eth0:1.. I only figured out this method because not many applications today have an option of binding to a particular interface.

share|improve this question
up vote 2 down vote accepted
iptables -t nat -I PREROUTING -p tcp --dport 3129 -d -j REDIRECT --to-port 3128

But your statement that "not many applications today have an option of binding to a particular interface" does not match with my experience -- most applications I have deployed have an option to do this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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