i try to forward the second public ip from my online server to my homeserver. In fact i think i miss only little things. Maybe someone could route me the right way
Here is a sketch of what i have in mind:
The online server run Ubuntu 21.04 as wireguard server. Wireguard runs perfekt. I could access every device via vpn in my home.
I ordered a second ip for my server but did not attached it to it. I route it over wireguard to my mikrotik router at home:
Code: Select all
ip route add 8.3.2.1/32 via 10.1.1.2 dev wg0main
Now the additional mikrotik configuration where i think i made a mistake:
Code: Select all
/routing table
add fib name=""
add disabled=no fib name=vpn
/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark \
new-connection-mark=vpn-conn passthrough=no src-address=10.1.1.1
add action=mark-routing chain=prerouting connection-mark=vpn-lima-conn \
new-routing-mark=vpn passthrough=yes
add action=mark-routing chain=output connection-mark=vpn-conn \
new-routing-mark=vpn passthrough=yes
Code: Select all
/ip route
add disabled=no distance=1 dst-address=8.3.2.1/32 gateway=192.168.123.10 \
pref-src=0.0.0.0 routing-table=vpn scope=30 suppress-hw-offload=no \
target-scope=10
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=wg0main pref-src=\
0.0.0.0 routing-table=vpn scope=30 suppress-hw-offload=no \
target-scope=10