Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
ubuntu...no firewall atm –  user56231 Oct 7 '10 at 0:37

2 Answers 2

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. http://www.shorewall.net/NAT.htm#One-to-one

share|improve this answer

Your Answer


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