Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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'm trying to use OpenVPN on my Ubuntu 10 VPS.

I'm trying to route my traffic using this command:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT -to

The error I get is:

iptables v1.4.4: You must specify --to-source

What should the source be?

share|improve this question

migrated from stackoverflow.com Jul 16 '11 at 14:28

This question came from our site for professional and enthusiast programmers.

You have to specify where you want the traffic to go to

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source aa.bb.cc.dd

where "aa.bb.cc.dd" is where you want the traffic to go.

See also

https://help.ubuntu.com/community/OpenVPN

https://help.ubuntu.com/community/IptablesHowTo

share|improve this answer

Your Answer

 
discard

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