angristan / wireguard-install

WireGuard VPN installer for Linux servers
https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
MIT License
8.33k stars 1.34k forks source link

No routing to internet #520

Open gerryb opened 2 months ago

gerryb commented 2 months ago

On VPS server (Unbuntu) or on a raspberry Pi Server, I cannot get the client to route everything to the internet via wiregaurd through my servers.

I have played with NAT rules and sysctl net.ipv4.ip_forward=1 to no avail. The clients are set to forward all packets, and indeed must be doing so as the client then loses all internet connection when wireguard is started. The server is not routing or the DNS not working.

The script is otherwise excellent. I wonder if the menu options should include "Do you want Server's LAN access? Server only access? Route all traffic from client to internet via this server" and configure accordingly.

Gerry

mleku commented 2 months ago

it sounds like your firewall is preventing outbound access for the wireguard

gerryb commented 2 months ago

Thank you for the reply.  Server port is open udp and TCP and android client does not have outgoing port blocking as far as I know. I will double check my windows clients. Thanks for the idea.

Gerry

On 5 Sept 2024, 17:43, at 17:43, mleku @.***> wrote:

it sounds like your firewall is preventing outbound access for the wireguard

-- Reply to this email directly or view it on GitHub: https://github.com/angristan/wireguard-install/issues/520#issuecomment-2332195880 You are receiving this because you authored the thread.

Message ID: @.***>

DanilValiev commented 2 months ago

Same problem, if there is a solution I would be grateful!

eth5 commented 2 months ago

I have the same problem. Now no VPN (wire guard, openvpn) connects to the Internet. Removing wireguard from the script does not solve the problem. Only shadowsocks remains to work

gerryb commented 2 months ago

I have it working now. Angristan was correct. Firewall issue.

My ISP VPS firewall system was not working in applying  the rules set, so there was no connection.

The wireguard  client app gives the impression it has connected on turing on a tunnel and changes the default route  to nowhere when not connected to the server. Openvpn does not do that, nor Softether VPN. No connection  "on" back to off, and there is no change in default route until actually connected.

Once you have a connection, there is a little handshake message.

So this confusion is nothing to do with the excellent install script, but a wireguard 'feature'  confusing me.

Gerry

On 7 Sept 2024, 08:10, at 08:10, eth5 @.***> wrote:

I have the same problem. Now no VPN (wire guard, openvpn) connects to the Internet. Removing wireguard from the script does not solve the problem. Only shadowsocks remains to work

-- Reply to this email directly or view it on GitHub: https://github.com/angristan/wireguard-install/issues/520#issuecomment-2335098903 You are receiving this because you authored the thread.

Message ID: @.***>

supersidr commented 1 month ago

@gerryb How did you fix that?

gerryb commented 1 month ago

Got the ISP who run off server running the firwewall for my VPS to fix the firewall which was not applying firewall rule set. They still have problems with IPv6. So the issue was not routing at server end at all Wiregaud is now working on my two VPS, and I applied to my Raspberry Pi server as well. It did my own rather crude testing as a ham on these matters and my SSH socks proxy was fastest to my surprise.

Straight connection with no VPN on my fibre line gives 980Mbps. Upload and download speeds were always similar.

SocksProxy using SSH (secured; key-only authentication) connecting to my VPS server came out best to my surprise. Normally I used Seamonkey Browser to use this proxy tunnel, not all of windows. It averaged 600Mbps. When I set windows itself to use this proxy tunnel the speed was 680Mbps. uploads almot identical

SoftetherVPN with its own protocol and client 460Mbps WireGuard 280Mbps Open VPN 150Mbps L2PP/IPSEC 140Mbps