• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

add wireguard bgp route mode

WireGuard
3
8
1.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y
    yon 0
    last edited by Jan 24, 2021, 4:55 AM

    i want to use wireguard creat p2p vpn for run bgp router. so this need supported. need add Table = off and set static route.

    like:

    link text

    link text

    link text

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Jan 26, 2021, 4:01 AM

      As far as I know we don't use wg-quick. Until recently it didn't add routes at all, or a gateway.

      Since it now only adds routes to the local interface IP they would not conflict. At that level at least.

      What problem are you actually seeing here?

      Steve

      Y 1 Reply Last reply Jan 26, 2021, 7:21 AM Reply Quote 0
      • Y
        yon 0 @stephenw10
        last edited by yon 0 Jan 26, 2021, 7:25 AM Jan 26, 2021, 7:21 AM

        @stephenw10 said in add wireguard bgp route mode:

        As far as I know we don't use wg-quick. Until recently it didn't add routes at all, or a gateway.

        Since it now only adds routes to the local interface IP they would not conflict. At that level at least.

        What problem are you actually seeing here?

        Steve

        p2p mode. use AllowedIPs = 0.0.0.0/0 or AllowedIPs = ::/0 but it isn't add system route. so it is use bgp for route.

        a common pattern for DN42 tunnels is to use AllowedIPs = 0.0.0.0/0 or AllowedIPs = ::/0 then use firewall rules to limit source and destination addresses. If you do not add 'Table = off' this could cause you to route clearnet traffic via your peer and potentially lose connectivity to your node!
        

        Should add a P2P mode option eg: for ipv4 i am need use proxy mode, but ipv6 use p2p+bgp mode. so i have ipv6 space.

        S 1 Reply Last reply Jan 26, 2021, 11:45 AM Reply Quote 0
        • S
          stephenw10 Netgate Administrator @yon 0
          last edited by Jan 26, 2021, 11:45 AM

          Have you actually tried this?

          As far as I can see that is already the default behaviour. A default route is not added is you have 0/0 as allowed-ips.

          Steve

          Y 1 Reply Last reply Jan 26, 2021, 2:14 PM Reply Quote 0
          • Y
            yon 0 @stephenw10
            last edited by Jan 26, 2021, 2:14 PM

            @stephenw10

            i had try it. when setup allow =0.0.0.0/0,2000::/3 then system all route via wg0.

            1 Reply Last reply Reply Quote 0
            • J
              jimp Rebel Alliance Developer Netgate
              last edited by Jan 26, 2021, 3:22 PM

              This works fine without changing anything.

              If you have only one peer per tunnel, leave Allowed IPs empty. WireGuard behaves as if it's set to route anything that reaches the WireGuard interface, and no routes are added to the OS routing table. BGP can setup its own routes.

              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              Y 1 Reply Last reply Jan 27, 2021, 8:41 AM Reply Quote 0
              • Y
                yon 0 @jimp
                last edited by yon 0 Jan 27, 2021, 9:13 AM Jan 27, 2021, 8:41 AM

                It is found that the interface will be confused.

                i config two wg tunnel, when i deleted wg0 tunnel, then update wg1 tunnel data, it will auto change interface name to wg0.
                the route gateway will use old deleted wg0 data for wg1.

                and i had deleted wg0 name still show interface list.

                Can we choose to configure the interface name?

                🔒 Log in to view

                and i had deleted wg tunnel and interface, but use ifconfig command still show all old wg0 wg1 .. in interface.

                Y 1 Reply Last reply Jan 27, 2021, 9:10 AM Reply Quote 0
                • Y
                  yon 0 @yon 0
                  last edited by Jan 27, 2021, 9:10 AM

                  wg interface config ipv4 and ipv6 address,
                  eg: 10.0.0.102/32, 2a0d:2400:12:c::102/128
                  but the interface only has ipv4.

                  1 Reply Last reply Reply Quote 0
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.