0

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?

2
  • What distro or which firewall are you using?
    – Zoredache
    Oct 6, 2010 at 16:29
  • ubuntu...no firewall atm
    – user56231
    Oct 7, 2010 at 0:37

2 Answers 2

3

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
1
  • It is likely he will also want the a rule to handle incoming traffic as well.
    – Zoredache
    Oct 6, 2010 at 16:30
0

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

You must log in to answer this question.