0

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

  1. When I log into the VPN with my laptop, I am only able to access google.com and few other sites.
  2. 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>

1
  • If you use push on server side, then you have to use pull on client side. Dec 24, 2016 at 15:50

1 Answer 1

0

To allow clients to communicate with each other through the VPN read that:

https://openvpn.net/index.php/open-source/documentation/howto.html#quick

and navigate to "Including multiple machines on the client side when using a routed VPN (dev tun)"

If you may not open any sites check your DNS

  1. Disable "iptables" and "selinux" for test purposes
  2. Try to use core DNS: 8.8.8.8
1
  • iptables and selinux are disabled, the communication between the clients now works, but I can still access very few sites (not even twitter) but google and wikipedia...
    – Ardupi de
    Dec 25, 2016 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .