Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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