I am currently setting up an OpenVPN on my vServer. Everything is configured and the clients are able to connect to the VPN and get their IP-Addresses. The problem is
- When I log into the VPN with my laptop, I am only able to access google.com and few other sites.
- The clients are not able to communicate with each other
Do you have any idea, why my setup isn't working? (I am running CentOS 7)
My server configuration:
port 1194
proto udp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key # This file should be kept secret
dh /etc/openvpn/keys/dh4096.pem
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
client-to-client
keepalive 10 120
cipher AES-256-CBC
persist-key
persist-tun
status openvpn-status.log
log-append /var/log/openvpn/openvpn.log
verb 3
My firewall configuration:
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o tun+ -j MASQUERADE
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
The client configuration:
client
dev tun
proto udp
remote <serverIP> 1194
resolv-retry infinite
nobid
persist-key
persist-tun
verb 3
ca <path to ca>
cert <path to cert>
key <path to key>
push
on server side, then you have to usepull
on client side.