Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 -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 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 -j SNAT --to-source

where "" is where you want the traffic to go.

See also

share|improve this answer

Your Answer


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