OPNsense Forum

English Forums => Virtual private networks => Topic started by: ddeell on July 02, 2023, 09:23:28 am

Title: What do I do to connect to the vps wireguard peer on my PC
Post by: ddeell on July 02, 2023, 09:23:28 am
This is my first time using opnsense and everything is working very well, but when I try to connect to the VPN using the wireguard client on my PC, the VPN is connected but there is no network, how do I set up the firewall or routing rules to make it work?

My LAN segment is 10.10.10.1/24, the VPN segment is 10.8.0.1/24.

Best Regards.
Title: Re: What do I do to connect to the vps wireguard peer on my PC
Post by: Patrick M. Hausen on July 02, 2023, 12:15:23 pm
What does your Wireguard config on your PC look like? Specifically the allowed networks? What do the firewall rules for Wireguard on your OPNsense look like?
Title: Re: What do I do to connect to the vps wireguard peer on my PC
Post by: ddeell on July 02, 2023, 01:46:18 pm
Thansk for your replay.
 
This is my wireguard config on my PC below. I hope all traffic will flow through this tunnel when I connect to the VPN.
[Interface]
PrivateKey = xxxxxxxxx
Address = 10.8.0.2/24
DNS = 1.1.1.1

[Peer]
PublicKey = xxxxxxxxxxxxx
PresharedKey = xxxxxxxxxx
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = "vps ip address":51820
PersistentKeepalive = 25

I have tried to configure firewall rules and nat, but none of them seem to work, can you point out what is wrong in these?(Please refer to the attachments).

Thanks!


Title: Re: What do I do to connect to the vps wireguard peer on my PC
Post by: ddeell on July 04, 2023, 12:30:37 pm
I have fixed this issue. I have to explicitly let udp 51820 on the other side into my firewall