I have a wireguard interface running on the default udp/51820. I want to test other incoming ports and am wondering if using a redirect + opening the target ports is a good strategy to do it? I don't want to create multiple wireguard interfaces for testing purposes.
I am thinking something like:
config redirect
option dest 'wg0'
option target 'DNAT'
option name 'test forward'
list proto 'udp'
option src 'wan'
option src_dport '123'
option dest_port '51820'
And
config rule 'wg'
option name 'allow-wireguard'
option proto 'udp'
option target 'ACCEPT'
option src 'wan'
option dest_port '123 51820'
option family 'ipv4'
Some public wifi networks block wireguard connections so I want to try some non-standard ports to hit my Openwrt device when away from home. I know 51820 is not viable.
I would like to setup 10-12 ports for testing and then once I am away from home connected to that remote WiFi network, systematically try connecting to them one-at-time by editing the wireguard profile on the iOS device. Hence my idea to setup the redirects before I leave home. Am I not understanding something?
For the record, the wireguard section of /etc/config/network:
The reason I want to try it this way is because I want to test multiple ports without traveling back-and-forth since my remote device is just a simple iPhone.
My plan is to set up all the redirects corresponding to each of the ports I wish to try. Hope that makes sense.
Not in relation to the specific issue in this thread, but:
If you want to create a site-to-site VPN, for instance, with a (multiple) hub-and-spoke or other partially or fully meshed topology, and you have many connections from and to each router, and you want to use a dynamic routing protocol within the VPN without loosing your sanity, then you want to have many many point-to-point interfaces.
(Yes you can use a single wg-interface on a single hub-and-spoke, and configure i.e. OSPF with Point-to-Multipoint. But as soon as you want to have redundant connections to multiple hubs or maybe even interconnects (partial mesh) you will want to have dedicated point-to-point links/interfaces because otherwise you are unable to assign different costs to your interfaces, like which link is preferred if multiple routers offer the same reachability to a network.)