Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


No internet on OpenVPN
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

No internet on OpenVPN

iwillkillyoiwillkillyo Member
edited October 2016 in Help

EDIT:

I've figured it out that the problem is not the DNS it's the whole server. I naivly only pinged the VPN server's IP, but no other IP adresses are responding. I have copied the working config from the working server but still nothing happened. So, I think something wrong should be host-wise. Somebody can help me please?

Hello,

I have 2 servers both with OpenVPN. Both installed with Nyr's script. I had to modify the connection type from udp to tcp, because I'm living in a dorm, and the sysadmin blocked almost all connections, so I'm running both servers on 443:tcp. The first server is working fine. I can connect, it can resolve domains, no problems at all.
The other server however can't resolve domains. Installed with Nyr's script too, and only modifyed the server.conf and client conf to use tcp instead of udp. Can somebody help me where to start debugging or if you encountered this problem please suggest a fix. Also if you thing this is the host's fault, please mention this too. (The two server's are from two different hosts!)

Regards,
Iwillkillyo

Comments

  • racksxracksx Member
    edited October 2016

    try setup the nameserver 8.8.8.8 8.8.4.4 in the config,

    push "dhcp-option DNS 8.8.4.4"
    push "dhcp-option DNS 8.8.8.8"
    



    or use

    script-security 2
    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    
  • Make sure you have these in server.conf:

    push "dhcp-option DNS 8.8.8.8"
    push "dhcp-option DNS 8.8.4.4"
    

    But maybe this help too; add this option to server.conf and restart openvpn server:

    push "block-outside-dns"
    

    No need to edit client.conf.

  • may be you forgot to enable ip forward, or apply the iptables rules. can you ping 8.8.8.8?

  • iwillkillyoiwillkillyo Member
    edited October 2016

    @andrew said:
    Make sure you have these in server.conf:

    push "dhcp-option DNS 8.8.8.8"
    push "dhcp-option DNS 8.8.4.4"
    

    But maybe this help too; add this option to server.conf and restart openvpn server:

    push "block-outside-dns"
    

    No need to edit client.conf.

    Did not work :S

    @racksx said:
    try setup the nameserver 8.8.8.8 8.8.4.4 in the config,

    push "dhcp-option DNS 8.8.4.4"
    push "dhcp-option DNS 8.8.8.8"
    



    or use

    script-security 2
    up /etc/openvpn/update-resolv-conf
    down /etc/openvpn/update-resolv-conf
    

    Did not work either :(

    @NanoG6 said:
    may be you forgot to enable ip forward, or apply the iptables rules. can you ping 8.8.8.8?

    `iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination`

    sysctl net.ipv4.ip_forward net.ipv4.ip_forward = 1

    I think this should be right, correct me if I'm wrong :)
    Can't ping 8.8.8.8 btw

  • I've updated the main post, the problem isn't about DNS.

  • ZeastZeast Member
    edited October 2016

    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

    or

    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE

  • iwillkillyoiwillkillyo Member
    edited October 2016

    @Zeast said:
    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

    or

    iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE

    root@tamaspleszkan:~# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE iptables v1.4.14: can't initialize iptables table nat: Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. root@tamaspleszkan:~# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE iptables v1.4.14: can't initialize iptables table nat: Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. root@tamaspleszkan:~#

  • The problem was host-sided, it is now resolved. Thank you all for trying to help me out!

  • ZeastZeast Member
    edited October 2016

    @iwillkillyo said:
    The problem was host-sided, it is now resolved. Thank you all for trying to help me out!

    Anyways you have a old old kernel or OS

  • Does your dorm have a http proxy?

Sign In or Register to comment.