I want to setup an OpenVPN Server and after a week of trying day and night (no Linux Knowledge) I was able to successfully connect to the Server using OpenVPN GUI but now that I can Connect there is no ping 8.8.8.8 and the webpages won't open.
Server is Running: CentOS 7 X64
Client is Running: Windows 10 Pro Build 10586.17 X64 w/ Kaspersky Internet Security
This is my server Config
#change with your portport 1337#You can use udp or tcpproto udp# "dev tun" will create a routed IP tunnel.dev tun#Certificate Configuration#ca certificateca ca.crt#Server Certificatecert server.crt#Server Key and keep this is secretkey server.key#See the size a dh key in /etc/openvpn/keys/dh dh2048.pem#Internal IP will get when already connectserver 192.168.200.0 255.255.255.0#this line will redirect all traffic through our OpenVPNpush "redirect-gateway def1"#Provide DNS servers to the client, you can use goolge DNSpush "dhcp-option DNS 8.8.8.8"push "dhcp-option DNS 8.8.4.4"#Enable multiple client to connect with same keyduplicate-cnkeepalive 20 60comp-lzopersist-keypersist-tundaemon#enable loglog-append /var/log/myvpn/openvpn.log#Log Levelverb 3
This is my Client Config
clientdev tunproto udpremote MY_SERVER_IP_ADDRESS 1337resolv-retry infinitenobindpersist-keypersist-tunmute-replay-warningscomp-lzoverb 3<ca>-----BEGIN CERTIFICATE-----XXXXXXXXXXXXXXXXXXXXXXXXX-----END CERTIFICATE-----</ca><cert>-----BEGIN CERTIFICATE-----XXXXXXXXXXXXXXXXXXXXXXXXX-----END CERTIFICATE-----</cert><key>-----BEGIN PRIVATE KEY-----XXXXXXXXXXXXXXXXXXXXXXXXX-----END PRIVATE KEY-----</key>
EDIT: so I added the below commands too.
yum install iptables-services -ysystemctl mask firewalldsystemctl enable iptablessystemctl stop firewalldsystemctl start iptablesiptables --flushiptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADEiptables-save > /etc/sysconfig/iptablesnano /etc/sysctl.confADDEDD THIS TO sysctl.conf -> net.ipv4.ip_forward = 1systemctl restart network.servicesystemctl -f enable openvpn@server.servicesystemctl start openvpn@server.service
But still I can connect but I have no ping and can't open any website.
Below is my route print
after establishing the connection to my Server.
Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.11 10 0.0.0.0 128.0.0.0 192.168.200.5 192.168.200.6 20 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 128.0.0.0 128.0.0.0 192.168.200.5 192.168.200.6 20 MY_SERVER_IP 255.255.255.255 192.168.1.1 192.168.1.11 10 169.254.0.0 255.255.0.0 On-link 169.254.61.91 276 169.254.61.91 255.255.255.255 On-link 169.254.61.91 276 169.254.255.255 255.255.255.255 On-link 169.254.61.91 276 192.168.1.0 255.255.255.0 On-link 192.168.1.11 266 192.168.1.11 255.255.255.255 On-link 192.168.1.11 266 192.168.1.255 255.255.255.255 On-link 192.168.1.11 266 192.168.183.0 255.255.255.0 On-link 192.168.183.1 276 192.168.183.1 255.255.255.255 On-link 192.168.183.1 276 192.168.183.255 255.255.255.255 On-link 192.168.183.1 276 192.168.200.1 255.255.255.255 192.168.200.5 192.168.200.6 20 192.168.200.4 255.255.255.252 On-link 192.168.200.6 276 192.168.200.6 255.255.255.255 On-link 192.168.200.6 276 192.168.200.7 255.255.255.255 On-link 192.168.200.6 276 192.168.230.0 255.255.255.0 On-link 192.168.230.1 276 192.168.230.1 255.255.255.255 On-link 192.168.230.1 276 192.168.230.255 255.255.255.255 On-link 192.168.230.1 276 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.1.11 266 224.0.0.0 240.0.0.0 On-link 169.254.61.91 276 224.0.0.0 240.0.0.0 On-link 192.168.200.6 276 224.0.0.0 240.0.0.0 On-link 192.168.230.1 276 224.0.0.0 240.0.0.0 On-link 192.168.183.1 276 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.1.11 266 255.255.255.255 255.255.255.255 On-link 169.254.61.91 276 255.255.255.255 255.255.255.255 On-link 192.168.200.6 276 255.255.255.255 255.255.255.255 On-link 192.168.230.1 276 255.255.255.255 255.255.255.255 On-link 192.168.183.1 276