Vraag
Reacties
Oplossing
leonsy
Level 2

How can I fix the error port 51820 is not opened?

Hi, I did setup to open the port 51820 on my router. However, when I check on canyouseeme.org, the port is not opened. What am I doing wrong? Can someone please help.

0 Kudos
e-mail meldingen
Aan Uit
Oplossing

Geaccepteerde oplossingen
tobiastheebe
Level 20
T.E.A.M.

The modem router's IP address cannot be 192.168.178.52, the default value = 192.168.178.1 cannot be changed.

 

If 192.168.178.54:51820 is reachable, this means that WireGuard is listening on the WAN interface. Assuming correct firewall + NAT (port forwarding) + WireGuard client configuration, the WireGuard server should be reachable remotely (e.g. from 4G/5G) in this case.

Bekijk in context

0 Kudos
10 Reacties 10
tobiastheebe
Level 20
T.E.A.M.

Since your personal profile has not been filled out yet, I am going to assume you are using a SmartWifi modem in router mode (default configuration) for now.

 

Port checkers such as canyouseeme.org are only usable for ports which listen to TCP connections, WireGuard's port 51820 only listens to UDP by default. You will need to connect the WireGuard client application to the server by specifying your external IPv4 address to establish whether port forwarding is working correctly. If this connection fails:

 

  • Could you verify whether WireGuard is reachable within the LAN on the internal IP address you specified in the port forwarding rule?
  • Could you log in to the modem's web interface at 192.168.178.1 or 192.168.100.1 and disable all options except 'Firewall protection' for both IPv4 and IPv6 on the Advanced settings → Security → Firewall page?
  • Could you disable Advanced settings → UPnP and delete any port forwarding rules created by UPnP?
leonsy
Level 2
Topicstarter

Thank you for your explanation. I tried connecting from my iphone wireguard client to my router's wireguard server using my external ipv4 address and mobile data, but my internet does not work.

1. I was able to connect to the WireGuard server using its internal IP from my iphone device on the same LAN. The connection was successful.

2. Done

3. Done. I have only one port forwarding rule for my router which has wireguard server.

0 Kudos
tobiastheebe
Level 20
T.E.A.M.

If you are using your own router, configuring the modem in bridge mode is recommended. If the WireGuard server is running on the router itself and UDP 51820 is open on the WAN interface, configuring port forwarding is not necessary in this case. Be aware that the router will receive the external IPv4 address instead of the modem router, and it will be different from the current one.

0 Kudos
leonsy
Level 2
Topicstarter

I have Ziggo SmartWiFi and Pods setup in my home. If I use my Ziggo router in bridge mode, I will lose that setup, right? Is there any limitations of me not being able to port forward in Ziggo router and run a wireguard server in my second router?

0 Kudos
tobiastheebe
Level 20
T.E.A.M.

The modem will no longer broadcast Wi-Fi and the SmartWifi will no longer operate in bridge mode. The current configuration should work, but is non-optimal and adds complexity.

 

  • When you tested connectivity in the LAN previously, did you test in your router's LAN or the modem router's LAN?
    WireGuard must be reachable on the router's WAN interface, this can be verified by testing from the modem router's LAN.
  • Could you send screenshots of the following information by private message?
    1. Firewall + port forwarding configuration on modem router
    2. WireGuard configuration on own router (redact keys)
    3. Connection setup in WireGuard client on iPhone
0 Kudos
leonsy
Level 2
Topicstarter

Thanks for replying.

1. My ziggo modem router's IP is 192.168.178.52 (52) and IP assigned to my glinet router is 192.168.178.54 (54). When the endpoint in my wg config is 54 it works, but when it is 52 - it does not. 

2. Sure, thanks a lot for your help, I will send you screenshots.

0 Kudos
tobiastheebe
Level 20
T.E.A.M.

The modem router's IP address cannot be 192.168.178.52, the default value = 192.168.178.1 cannot be changed.

 

If 192.168.178.54:51820 is reachable, this means that WireGuard is listening on the WAN interface. Assuming correct firewall + NAT (port forwarding) + WireGuard client configuration, the WireGuard server should be reachable remotely (e.g. from 4G/5G) in this case.

0 Kudos
tobiastheebe
Level 20
T.E.A.M.

I received your PM and am unable find any configuration errors, although I am not using WireGuard myself. You may edit the port forwarding rule to only match UDP connections. Does the endpoint IP address match the external IPv4 address displayed by e.g. canyouseeme.org?

0 Kudos
leonsy
Level 2
Topicstarter

Hi I tried again connecting my iphone to my public IP address endpoint in wireguard now. It got connected today, whereas there was no internet yesterday. Probably I just had to wait. Thanks and sorry!

tobiastheebe
Level 20
T.E.A.M.

No worries, glad to read it is working now.

0 Kudos