I have installed OpenVPN on Debian server, and tried to connect my Android phone to the VPN. The connection works, but when I open whatismyip.com in the phone browser, it still returns my normal IP address, not the server address.

Below is the server.conf, after following this tutorial (which has some small errors in it btw).

port 1194
proto udp
dev tap

ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/server.crt
key /etc/openvpn/certs/server.key
dh /etc/openvpn/certs/dh4096.pem
tls-auth /etc/openvpn/certs/ta.key 0

server 192.168.88.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

keepalive 1800 4000

cipher DES-EDE3-CBC # Triple-DES
comp-lzo

max-clients 10

user nobody
group nogroup

persist-key
persist-tun

log /var/log/openvpn.log
status /var/log/openvpn-status.log
verb 5
mute 20

How can I set this up so that all traffic goes through this VPN server?

You have to tunnel your server and then switch browser's proxy setting it to the tunnel. Let me give you an example. But previously have ssh server installed on your Debian server. If you are on Linux, that will work for you straight:

ssh -fND localhost:8080 user@server

or, if Windows, you can create ssh tunnel by Putty

then in your browser in network setting allow proxy ans set it to:

SOCKS:127.0.0.1 port 8080

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.