I want to use OpenVPN to access the web and email from China. How?

My question: How do I use my already existing OpenVPN setup to enable secure, remote web surfing and email checking from open wireless hotspots?

edit3 - Bride of Edit The final solution is below but in case no one reads that far the final solution was to forward the data using: sudo -s echo 1 > /proc/sys/net/ipv4/ip_forward

edit2 I've implemented the directions in the "How To" but all I get is my internet connection timing out. What I did was enable push "redirect-gateway def1" in the conf and then set iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE. This is as they suggest in the manual but it does not work.

edit: I see in their manual that they explain the first bit of how to do this and then say "The server will need to be configured to deal with this traffic somehow," and offer a few options. But that "somehow" has me bugged because it seems like there should a "best way" and I'm not sure I understand enough about the options provided to determine this way.

Some long winded details:

I am running Ubuntu and have OpenVPN up and working fine as a server. My client machine connects fine as well. However, that just gets me a secure connection to my home network.

What I want is to be able to access my VPN server and surf the web or check email securely from anywhere with an open wireless connection. I am frequently in China and having secure, unblocked access would be a boon (especially since I like to work from tea houses and coffee shops and I've already had a password sniffed and hacked once).

I already know how to tunnel over SSH via a SOCKS proxy using something like:

ssh -ND 8887 -p 22 [email protected]  

but since I have OpenVPN I figure why not try it? So... what are the steps involved in making it so I can connect to my VPN and the surf and check mail to my hearts content (slowly to be sure but at least it wold be secure). Thx!

2022-07-25 20:40:20
Source Share
Answers: 2

it deserves examining your web server is set up to forward/route packages

on my equipment, I can examine that with "cat/ proc/sys/net/ ipv4/ip _ forward" if that is 0, do "echo 1 >/ proc/sys/net/ ipv4/ip _ forward"

if that isn't it, and also you do not have the FORWARD iptables chain refuting you in some way, I would certainly upload a traceroute and also see just how much it obtains.

2022-07-25 21:45:57

The needed command was: sudo -s echo 1 > /proc/sys/net/ipv4/ip_forward

Note the sudo -s... for some reason a simple sudo would not cut it on my server.

2022-07-25 21:41:35