WireGuard / wireguard-vyatta-ubnt

WireGuard for Ubiquiti Devices
https://www.wireguard.com/
GNU General Public License v3.0
1.46k stars 69 forks source link

Wireguard interface creates unnecessary routes #16

Closed mvn23 closed 4 years ago

mvn23 commented 4 years ago

On my e300-v1 I have a wireguard interface with the following config:

 wireguard wg23 {
     address 10.8.23.193/26
     description "Wireguard"
     firewall {
         in {
             name WG23_IN
         }
         local {
             name WG23_LOCAL
         }
     }
     fwmark 0x23
     listen-port 51820
     mtu 1420
     peer **redacted** {
         allowed-ips 10.8.23.194/32
         description Droidberg
         preshared-key **redacted**
     }
     peer **redacted** {
         allowed-ips 10.8.23.195/32
         description Calculon
         preshared-key **redacted**
     }
     private-key **redacted**
     route-allowed-ips false
 }

The setup works as expected, but I noticed something strange in the routing table of the EdgeRouter. Apart from all expected routing changes, there is one additional route that I can't place:

0.0.0.0/26 dev wg23  proto kernel  scope link 

This route is present whenever the wireguard interface is up and gets removed when the interface is taken down. If I add more than one wireguard interface, more such routes are added as well. This does not happen on other platforms.

moepman commented 4 years ago

I can confirm this behaviour on a few EdgeRouter X (e50) with both v1.10.11 and v2.0.8

Lochnair commented 4 years ago

Previous thread on the issue: https://github.com/Lochnair/vyatta-wireguard/issues/95 Also this Ubiquiti forum thread: https://community.ui.com/questions/Routing-Table-Entry-0-0-0-0-24/85f58c90-096a-4522-a30f-1ff0129fafc5

This doesn't affect only WireGuard, but other tunnel interfaces as well.

mvn23 commented 4 years ago

Thanks for the references @Lochnair, no wireguard bug then. Closing this issue.