OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • Wireguard & Mullvad - I'm lost.....
« previous next »
  • Print
Pages: 1 2 3 [4] 5 6

Author Topic: Wireguard & Mullvad - I'm lost.....  (Read 37830 times)

cdine

  • Newbie
  • *
  • Posts: 14
  • Karma: 4
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #45 on: August 23, 2020, 08:41:58 am »
Quote from: cyrus104 on August 09, 2020, 08:35:06 am
[...]

When I ping something like 1.1.1.1, my VLAN gateway response with a positive ping result. I'm not sure but guessing that I have a NAT issue.

I'm at the same spot - everything on the Wireguard side is working, but I cannot get traffic to route to it via policy routing, and the opnsense gateway responds to pings/etc when I would expect those packets to traverse Wireguard, for example:

Code: [Select]
$ netstat -nr -f inet
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 ens192
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 ens192


$ ping 8.8.8.8 -c1
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.201 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.201/0.201/0.201/0.000 ms

Have others who ran in to this figured out what the issue is? I haven't seen this behavior using similar setups with OpenVPN and the like.
Logged

sleepnow75

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #46 on: September 01, 2020, 01:13:29 am »


Quote from: cdine on August 23, 2020, 08:41:58 am
Quote from: cyrus104 on August 09, 2020, 08:35:06 am
[...]

When I ping something like 1.1.1.1, my VLAN gateway response with a positive ping result. I'm not sure but guessing that I have a NAT issue.

I'm at the same spot - everything on the Wireguard side is working, but I cannot get traffic to route to it via policy routing, and the opnsense gateway responds to pings/etc when I would expect those packets to traverse Wireguard, for example:

Code: [Select]
$ netstat -nr -f inet
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 ens192
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 ens192


$ ping 8.8.8.8 -c1
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.201 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.201/0.201/0.201/0.000 ms

Have others who ran in to this figured out what the issue is? I haven't seen this behavior using similar setups with OpenVPN and the like.

You're not alone --  I'm experiencing the same symptoms.  Have yet to find a solution.   

It appears to work fine if you untick 'Disable Routing' at which point all traffic flows through the VPN which isn't what we're trying to accomplish. 
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6331
  • Karma: 435
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #47 on: September 01, 2020, 06:14:25 am »
Screenshots?
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

sleepnow75

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #48 on: September 02, 2020, 03:42:25 pm »
Got it all working with NordPVN,  I still need to work though my DNS issues, but once I've nailed that then I'll include some shots.   

Big thanks to mimugmail.

This did it for me:
1. Create local instance with Mullvad settings, tick "Disable Routes" and under Advanced set Gateway "1.2.3.4"
2. Create endpoint (0.0.0.0, 1.2.3.4)
3. Link endpoint in local instance
4. Assign an Interface to WG, no IP config and lock it
5. Go to System : Gateways : Single, create a gateway, Interface WG, IP address of gateway 1.2.3.4, tick "Far Gateway"
6. Go to Firewall rules and set the stuff you want with gateway of WG.

Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6331
  • Karma: 435
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #49 on: September 02, 2020, 03:59:41 pm »
Quote from: sleepnow75 on September 02, 2020, 03:42:25 pm
Got it all working with NordPVN,  I still need to work though my DNS issues, but once I've nailed that then I'll include some shots.   

Big thanks to mimugmail.

This did it for me:
1. Create local instance with Mullvad settings, tick "Disable Routes" and under Advanced set Gateway "1.2.3.4"
2. Create endpoint (0.0.0.0, 1.2.3.4)
3. Link endpoint in local instance
4. Assign an Interface to WG, no IP config and lock it
5. Go to System : Gateways : Single, create a gateway, Interface WG, IP address of gateway 1.2.3.4, tick "Far Gateway"
6. Go to Firewall rules and set the stuff you want with gateway of WG.


There is now an easier way:

Assign Interface and tick "Dynamic Gateway", Add Gateway and in IP field type as usual "dynamic".
The Gateway field in Wireguard can be empty.
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

sleepnow75

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #50 on: September 03, 2020, 02:22:13 am »
Quote
There is now an easier way:

Assign Interface and tick "Dynamic Gateway", Add Gateway and in IP field type as usual "dynamic".
The Gateway field in Wireguard can be empty.

Hmm, I started off with that very configuration without much luck. Rules were ignored until I added that gateway IP everywhere.
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13903
  • Karma: 1206
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #51 on: September 03, 2020, 11:56:04 am »
I'm moving this thread to general discussion since we are closing this 19.7 archive.
Logged

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #52 on: September 20, 2020, 11:51:51 am »

Quote
There is now an easier way:

Assign Interface and tick "Dynamic Gateway", Add Gateway and in IP field type as usual "dynamic".
The Gateway field in Wireguard can be empty.

I've been trying to follow all of the alternate ways people are getting this to work but having no luck.

Is the option you are talking about the same as 'Dynamic gateway policy' to tick?

I initially added the gateway in this way and it would never start, it shows up as 'defunct ' with no address, even though the wg link is up, so giving it an IP of 1.2.3.4 actually seemed to be progress, the gateway went green and seemed to be okay...although I still couldn't manage to get the routing working  :-[

I have multiple vlans and am trying to get one of those vlans to access the VPN, so should I be updating the rules for that vlan to access the vpn gateway or elsewhere?

Appreciate any help from anyone  :)
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6331
  • Karma: 435
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #53 on: September 20, 2020, 12:14:10 pm »
Screenshots of Rules, Gateways and Local instance
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #54 on: September 20, 2020, 02:26:06 pm »
Quote from: mimugmail on September 20, 2020, 12:14:10 pm
Screenshots of Rules, Gateways and Local instance

Local instance
« Last Edit: September 20, 2020, 07:17:09 pm by mannp »
Logged

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #55 on: September 20, 2020, 02:28:15 pm »
NAT Outbound
Logged

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #56 on: September 20, 2020, 02:29:22 pm »
Gateway
« Last Edit: September 20, 2020, 07:16:08 pm by mannp »
Logged

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #57 on: September 20, 2020, 02:34:02 pm »
vlan internet access rules, is currently set to all access and work, but when I disable the all access and push through the azire gw it does not work.

I am trying to only let specific vlans access this gateway :)

Thanks in advance for any pointers as to what I am missing.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6331
  • Karma: 435
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #58 on: September 20, 2020, 03:09:41 pm »
Packet Capture on the Azire Interface?
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

mannp

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
    • View Profile
Re: Wireguard & Mullvad - I'm lost.....
« Reply #59 on: September 20, 2020, 05:12:00 pm »
Quote from: mimugmail on September 20, 2020, 03:09:41 pm
Packet Capture on the Azire Interface?

Not something I have done or am able to do quickly.

Edit: So I found the option in Opnsense, not seen it before.... any specific options needed apart from selecting azire interface? :)

So I captured for a couple of minutes and wireshark says 'no packet' when I open the cap file...
« Last Edit: September 20, 2020, 07:02:11 pm by mannp »
Logged

  • Print
Pages: 1 2 3 [4] 5 6
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • Wireguard & Mullvad - I'm lost.....
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2