Use Wireguard only with WLAN

  1. In wg0 interface, set Advanced SettingsOverride IPv4 routing table and Override IPv6 routing table to 1000
  2. In wlan interface, also set these to 1000
  3. In RoutingIPv4 Rules add new rule
    • Incoming interface: wlan
    • Table 1000
  4. Repeat the same for IPv6
  5. If you need different DNS, you need to reconfigure default dnsmasq instance to listen only on lan and lo interfaces, and another instance with different configuration to listen only on wlan interface. Make sure to set the resolver address in DHCP and DNS → instance → ForwardsDNS Forwards, as it won't work properly if you set it in the interface, and set Ignore resolv file checkbox in Resolv & Hosts Files tab for this instance.
  6. Not sure of your configuration, but for mine there's some kind of race condition between bringing up the interface and running dnsmasq, which results in non-working dnsmasq upon boot. I had to create an empty bridge and put wlan interface into it, only after which it started to work properly. This is true for current snapshot, maybe stable version doesn't have this bug.

Also make sure that Wireguard interface is in WAN firewall zone.

1 Like