Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got a Lubuntu "server" (old laptop) running OpenVPN and SSH server. I have the proper ports forwarded in my home router so that I can connect via OpenVPN from the internet. I've also got push "redirect-gateway def1 bypass-dhcp" in the server .conf file. I think that there is a problem with my NAT despite having put iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE into the server and saving it.

I can connect OK (tun0 iface shows up) and SSH works after connecting to the VPN but web browsing still doesn't work. I've tried starting the VPN client from the command line and from network manager (I installed network-manager-openvpn-gnome) and results are the same either way. I've also tried from my phone (which has OpenVPN and SSH clients) and the results are the same-- Connects good. SSH good. No web browsing. What am I doing wrong?

I'm half way there by adding the iptables rules from here to the OpenVPN server. Note that the iptables rules in the link use interface tun+ and since I don't know what that is I used tun0 in my iptables rules. I also installed iptables-persistent to automagically reload iptables rules after reboot. I also enabled IPv4 forwarding in /etc/sysctl.conf by uncommenting the line net.ipv4.ip_forward=1. Now my phone can browse the web via the OpenVPN server but my other Lubuntu client still cannot.

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.