Why after connecting to OpenVPN stops working the Internet?

0 like 0 dislike
5 views
After connecting to OpenVPN stops working the Internet. I can not understand what could be the reason. Are connected respectively with Windows 10.

Local config:
client dev tun proto udp sndbuf 0 rcvbuf 0 remote  1194 resolv-retry infinite nobind persist-key persist-tun remote-cert-tls server auth SHA512 cipher AES-256-CBC comp-lzo setenv opt block-outside-dns key-direction 1 verb 3 auth SHA512


Config server:
port 1194 proto udp dev tun sndbuf 0 rcvbuf 0 ca ca.crt cert server.crt key server.key dh dh.pem auth SHA512 tls-auth ta.key 0 topology subnet server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt #push "redirect-gateway def1 bypass-dhcp" push "redirect-gateway def1" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" keepalive 10 120 cipher AES-256-CBC comp-lzo user nobody group nogroup persist-key persist-tun status openvpn-status.log verb 3 crl-verify crl.pem


Without connecting to VPN:
>nslookup
Address: 192.168.3.1

After:
>nslookup
Address: 8.8.8.8

After connecting, ping also not working.
by | 5 views

1 Answer

0 like 0 dislike
The logs should be written why.
And so on to the skid, probably not spelled out on the server.
Like that:
iptables-t nat -A POSTROUTING -s 10.8.0.0/24-j SNAT --to-source x.x.x.x


Where x.x.x.x - server IP where the traffic needs to go outside.

And should be allowed to forward packets:
echo "1" > /proc/sys/net/ipv4/ip_forward
And in the file /etc/sysctl.conf
net.ipv4.ip_forward = 1
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 13, 2019 by Maks1995
110,608 questions
257,186 answers
0 comments
33,719 users