I have a application which connects to my server and receives an internal ip of 10.8.0.2 when it connects.

My server also has 10 external ip's and I want to route 10.8.0.2 to use one of them when accessing the internet.

10.8.0.2 -> should go out using 95.xx.122.63

Is there a way to do that?

link|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
feedback

2 Answers

I suppose you are asking for snat:

iptables -t nat -A POSTROUTING -s 10.8.0.2 -j SNAT --to-source 95.XX.122.63
link|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
feedback

Shorewall one to one NAT appears to be what you are looking for. http://www.shorewall.net/NAT.htm#One-to-one

link|improve this answer
feedback

Your Answer

 
or
required, but never shown