OpenVPN Connected but no internet

Hi,

I have recently bough VPS from @Abdullah (webhorizon.in)

Earlier I was using dedicated VPS for openvpn. Now I am switched to NAT VPS. The problem is when I am connecting to OpenVPN through mobile or desktop app. It is connecting to VPN but no internet is working. I am not expert in VPS so need help!

Please let me know if any screenshot or log to be shown here.

Comments

  • You install openvpn the script way or manually?

    Action and Reaction in history

  • @elliotc said:
    You install openvpn the script way or manually?

    the script way by this commnad: wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh

  • Do you have iptables installed on your VPS? If so, you may need to add these lines to your config:

    iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE
    iptables -t nat -A PREROUTING -p tcp -i eth0 -d $eth0_addr --dport 80 -j DNAT --to 10.8.0.3
    

    Substitute with your IP and interface names.

  • ehabehab Content Writer

    @abskillz when you buy from @Abdullah there is no internet -- u don't need it.

  • @saibal said:
    Do you have iptables installed on your VPS? If so, you may need to add these lines to your config:

    iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o eth0 -j MASQUERADE
    iptables -t nat -A PREROUTING -p tcp -i eth0 -d $eth0_addr --dport 80 -j DNAT --to 10.8.0.3
    

    Substitute with your IP and interface names.

    hi, can you please elaborate further more? Where I have to put IP and interface name? and Which IP IPV4 or internal IP ?

  • @ehab said:
    @abskillz when you buy from @Abdullah there is no internet -- u don't need it.

    Hi, I just bought while ago. I don't know why no internet maybe I am doing some mistake in configuaration.

  • Have you enabled Tun? Which port you are using?

    Action and Reaction in history

  • @elliotc said:
    Have you enabled Tun? Which port you are using?

    Yes, tun is enabel. For the port I am using from my given 20 ports. Like my internal IP is ending with 180 so I am using 18005 for OpenVPN

  • ehabehab Content Writer

    @abskillz said:

    i was fooling around, i am sure he will help you if he has time. so open a ticket,.

  • @abskillz said:

    @elliotc said:
    Have you enabled Tun? Which port you are using?

    Yes, tun is enabel. For the port I am using from my given 20 ports. Like my internal IP is ending with 180 so I am using 18005 for OpenVPN

    But why are you using OpenVPN instead of wireguard which is faster than OpenVPN
    @Abdullah had linked both in his thread
    OpenVPN: https://github.com/Nyr/openvpn-install
    Wireguard: https://github.com/Nyr/wireguard-install

    Both scripts are well proofed , why not use them ?
    there is no problem in NATs as i am also using them at 2 locations . No issues faced

  • @kuduku said:

    @abskillz said:

    @elliotc said:
    Have you enabled Tun? Which port you are using?

    Yes, tun is enabel. For the port I am using from my given 20 ports. Like my internal IP is ending with 180 so I am using 18005 for OpenVPN

    But why are you using OpenVPN instead of wireguard which is faster than OpenVPN
    @Abdullah had linked both in his thread
    OpenVPN: https://github.com/Nyr/openvpn-install
    Wireguard: https://github.com/Nyr/wireguard-install

    Both scripts are well proofed , why not use them ?
    there is no problem in NATs as i am also using them at 2 locations . No issues faced

    I installed wireguard also now, but same issue connected but no internet.

  • @abskillz said:

    @kuduku said:

    @abskillz said:

    @elliotc said:
    Have you enabled Tun? Which port you are using?

    Yes, tun is enabel. For the port I am using from my given 20 ports. Like my internal IP is ending with 180 so I am using 18005 for OpenVPN

    But why are you using OpenVPN instead of wireguard which is faster than OpenVPN
    @Abdullah had linked both in his thread
    OpenVPN: https://github.com/Nyr/openvpn-install
    Wireguard: https://github.com/Nyr/wireguard-install

    Both scripts are well proofed , why not use them ?
    there is no problem in NATs as i am also using them at 2 locations . No issues faced

    I installed wireguard also now, but same issue connected but no internet.

    Are you using your allotted ports ?

  • have you activated forwader on kernel ?

    sysctl -w net.ipv4.ip_forward=1
    Thanked by (1)ehab
  • @kuduku said:

    @abskillz said:

    @kuduku said:

    @abskillz said:

    @elliotc said:
    Have you enabled Tun? Which port you are using?

    Yes, tun is enabel. For the port I am using from my given 20 ports. Like my internal IP is ending with 180 so I am using 18005 for OpenVPN

    But why are you using OpenVPN instead of wireguard which is faster than OpenVPN
    @Abdullah had linked both in his thread
    OpenVPN: https://github.com/Nyr/openvpn-install
    Wireguard: https://github.com/Nyr/wireguard-install

    Both scripts are well proofed , why not use them ?
    there is no problem in NATs as i am also using them at 2 locations . No issues faced

    I installed wireguard also now, but same issue connected but no internet.

    Are you using your allotted ports ?

    Yes, as I told you my internal IP ending with 180 so I am using 18001-18020 port

  • @isunbejo said:
    have you activated forwader on kernel ?

    sysctl -w net.ipv4.ip_forward=1

    Hi, did the same but not working :-)

  • dosaidosai OG
    edited March 2021

    Check your client.conf it should look like below,

    [Peer]
    AllowedIPs = 0.0.0.0/0, ::/0
    Endpoint = YOUR_NAT_IPV4:CUSTOM_PORT
    
  • Could be your ISP. Try using v2ray. It works even if your ISP is blocking VPN traffic.

  • If you are sure that the vpn is connected successfully (able to ping the server over the vpn) just no internet access, then sounds like iptables not set up correctly.

    I also bought a NAT VPS from @Abdullah recently and both of @Nyr scripts worked flawlessly for me. Did you use those or some other way? If you haven't tried those already I highly recommend reinstalling fresh using those scripts instead. Takes away a lot of the iptables/routing config issues that I used to struggle with in the past.

    OpenVPN: https://github.com/Nyr/openvpn-install
    Wireguard: https://github.com/Nyr/wireguard-install

    Both scripts are well proofed , why not use them ?

  • YmpkerYmpker OGContent Writer

    I don't know why but I had this issue once, too. It had to do with which DNS I selected during Nyr's setup. I think only system resolvers option worked for me. Try this and/or change your end user device's DNS manually to Google DNS or Quad9/CF..

  • @abskillz said: It is connecting to VPN but no internet is working.

    You are missing NAT rules in iptables/nftables.

Sign In or Register to comment.

This Site is currently in maintenance mode.
Please check back here later.

→ Site Settings