Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 a application which connects to my server and receives an internal ip of when it connects.

My server also has 10 external ip's and I want to route to use one of them when accessing the internet. -> should go out using 95.xx.122.63

Is there a way to do that?

share|improve this question
What distro or which firewall are you using? – Zoredache Oct 6 '10 at 16:29 firewall atm – user56231 Oct 7 '10 at 0:37

I suppose you are asking for snat:

iptables -t nat -A POSTROUTING -s -j SNAT --to-source 95.XX.122.63
share|improve this answer
It is likely he will also want the a rule to handle incoming traffic as well. – Zoredache Oct 6 '10 at 16:30

Shorewall one to one NAT appears to be what you are looking for.

share|improve this answer

Your Answer


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