Help to add a static route

Hi,

In order to complete the tutorial to setup wireguard in my Unraid server I have to fulfill to this requirement.

2. On your router, add a static route that lets your network access the WireGuard *Local tunnel network pool* through the IP address of your Unraid system. For instance, for the default pool of `10.253.0.0/24` you should add this static route:
  * **Destination Network**: `10.253.0.0/24` (aka `10.253.0.0` with subnet `255.255.255.0`)
  * **Gateway / Next Hop**: IP address of your Unraid system
  * **Distance**: *1* (your router may not have this option)
  * If you use a firewall such as pfSense on your network, you may also need to check the box for **Static route filtering - bypass firewall rules for traffic on the same interface**

I am afraid I am not doing it properly. Can someone help me to adapt it it openwrt instructiuons?

Thank you.

Is your router running OpenWRT ?
If so what system and build? If you are unsure you can post the output of:

ubus call system board

But general instructions can be found in the OpenWRT wiki:
https://openwrt.org/docs/guide-user/network/routing/routes_configuration

1 Like
        "kernel": "5.15.150",
        "hostname": "OpenWrt",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Ubiquiti EdgeRouter X",
        "board_name": "ubnt,edgerouter-x",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.3",
                "revision": "r23809-234f1a2efa",
                "target": "ramips/mt7621",
                "description": "OpenWrt 23.05.3 r23809-234f1a2efa"

And this is my current static route

config route                   
        option interface 'lan' 
        option target '10.253.0.0/24'
        option gateway '192.168.29.2'
        option type 'local' 

Change to unicast.

Are you setting up WireGuard as a server so that you can connect from outside to your network?

Is the WireGuard subnet 10.253.0.0/24?

Is the IP address of the Unraid server 192.168.29.2?

If that is the case than yes that is the correct static route but you can/should remove option type 'local'

But if this is a WireGuard server you also should probably need to set up a port forward on the router forwarding the WireGuard port to the unraid server

1 Like

Solved removing "option type 'local'"

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.