I want to use storj.
each storj-node needs one TCP and one UDP port to be forwarded in my router.
two storj-nodes reachable within the same IP-address are treated as one node.
i have 2 internal subnets connected to eachother: SON and MOM
Mom: 192.168.178.0
Son: 192.168.179.0
Both storj-nodes are running on 192.168.179.2 but should talk to internet via different gateways
Both Networks connected via Wireguard.
Dad 192.168.177.0
Son 192.168.179.0
I cannot replace his 7490 because of Telephone + DSL Modem usage.
Placed one OpenWRT Fritzbox 4040 at his 192.168.177.2 and forwarded Wireguard Port + storj port 25003.
Tried Docker Wireguard Client and was able to connect via dad.dyn.de.
iptables -A OUTPUT -t mangle -p tcp --sport 25002 -j MARK --set-mark 1
sudo ip rule add to all fwmark 1 lookup mama
sudo ip route add default via 192.168.178.1 dev enp0s25 table mama onlink
The first 2 rules are not needed. You only need the redirect.
marking is supposed to take place in OpenWrt firewall. There is a special target in the firewall rules to mark. Then use this mark to create an ip rule and forward the matched traffic to custom routing table. Finally create a default route in the custom routing table.
Better draw a complete diagram because in one post there is mom-son in another dad-son.
Policy routing should take place on the router which is running the S2S tunnel. Firewall marks are not passed from one device to another.
And the site to site tunnel with wireguard is from your 7590 to 4040 at your mother?
Then on your Fritzbox you need to route the packets with source port 25002 via the wireguard tunnel to your network. I don't know if there is policy routing in Fritzbox.
You have already forwarded 25002. So you are almost finished.
connected via WG: 7590 + 7490 (dad) + OpenWRT 4040 (mom).
fritzbox does not support PBR. tried to PBR on my linux machine.
found another thread with "macvlan" option to identify different traffic.
i just see 2 other options:
change 7590 to 4040 running OpenWRT
try storj without docker on linux machine (use services instead)
option 1: problem ip-phone. every 24h auto reconnect from ISP to change IP.
old Fritz FW did not reconnect phone after ip change....
will try again.
option 2: dont know if PBR on linux machine will work.
PBR works fine on any Linux and docker is not the problem here.
The problem is that the tunnel runs on the router. If, for example, you migrate the tunnel from the 7590 to the Debian, then it will be easy to direct traffic from 25002 towards the tunnel.
played the whole day with openwrt as mainrouter and fb7530 as phone client... on my network.
incoming calls did not work. tried any hint i was able to catch... SIP from LAN to wan, sipproxd,
portforwarding, traffic rules. used wireshark to analyse... i am still a newbie. will open a new thread "VoIP 1&1 with OpenWRT and IP-Client Fritzbox" and collect all Infos.
In Future i can change my 7590 to 4040 OpenWRT hopefully... would be easier that way.
install WG on Debian or inside Docker ?
full expansion: 5 nodes on linux.
3 nodes routing to dad, 2 nodes routing to mom
I think changing dad 7490 to 7530 OpenWRT needs still some development to establish DSL Modem.
lets focus on son <-> mom routing.