Hi There
Im trying to setup a CHR using an azure sponsorship (can’t actually spend money besides buying the CHR license if this works).
ISSUEs TO SOLVE:
- one of 2 buildings has losts its public IPv4 and we cant use IPv6 yet.
- the other building has its public ipv4, but it will eventually lose it too (And it gets losts from time to time too)
IDEA: Setup a CHR, connect both sites to it and enable:
- Remote access for me and other peers who would connect to it using wireguard and gain access to inside IPs for buildings 1 and 2
- Setup port redirection on CHR so that i can publish some public facing services FROM the CHR that would end up answred from a server either on building 1 or 2.
Addresses / networks for each site:
Building1: physical mikrotik
10.0.2.0/24: local network
10.200.2.0/24: wg site 2 site network
10.0.10.0/24: wg peers network (for computers, not other routers)
10.0.2.254: router
10.200.2.254: WG address for the non cloud inter building WG network
10.0.10.254: WG address for the peers (computers, not routers) WG network
10.0.1.1: WG address for the azure WG network
Building2: physical mikrotik
10.0.3.0/24: local network
10.0.3.254: router
10.200.2.252: WG address for the non cloud inter building WG network
10.0.1.2: WG address for the azure WG network
Azure: CHR with demo license
10.0.0.4: azure interface (placed as WAN in the interface list)
10.0.1.0/24: WG network for inter building stuff
10.200.1.0/24: WG network for peers who want to access the CHR or the other 2 buildings.
10.0.1.254: WG address for the azure WG network
10.200.1.254: WG address for the azure wg peers (computers, not routers) network.

Routes for each site (so far):
Not sure if this is optimal (and i might need to learn OSPF and/or other more advanced routing tools? never touched the “routing” submenu).
Buidling1:
DST-ADDRESS GATEWAY DISTANCE
;;; Ruta test S2S casa roberto
0 Xs 172.17.118.0/24 wg_mcc_country 1
;;; Ruta a guardia x azure
1 Xs 10.0.3.0/24 10.0.1.2 1
DAd 0.0.0.0/0 181.16.78.1 1
;;; Ruta red interfaz azure
2 As 10.0.0.0/24 10.0.1.254 1
DAc 10.0.1.0/24 wg_mcc_azure 0
DAc 10.0.2.0/24 bridge-local 0
;;; Ruta Guardia sin azure
3 As 10.0.3.0/24 10.200.2.252 1
;;; Guardia por tailscale
4 As 10.0.3.111/32 10.0.2.20 1
DAc 10.0.10.0/24 wgpeers 0
;;; Ruta azure peers
5 As 10.200.1.0/24 10.0.1.254 1
DAc 10.200.2.0/24 wg_mcc_country 0
DAc 181.16.78.0/24 ether1-internet 0
/ip route
add comment="Ruta test S2S casa roberto" disabled=yes distance=1 dst-address=172.17.118.0/24 gateway= wg_mcc_country pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="Ruta a guardia x azure" disabled=yes distance=1 dst-address=10.0.3.0/24 gateway=10.0.1.2 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment="Ruta red interfaz azure" disabled=no distance=1 dst-address=10.0.0.0/24 gateway=10.0.1.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment="Ruta azure peers" disabled=no distance=1 dst-address=10.200.1.0/24 gateway=10.0.1.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="Ruta Guardia sin azure" disabled=no distance=1 dst-address=10.0.3.0/24 gateway=10.200.2.252 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="Guardia por tailscale" disabled=no distance=1 dst-address=10.0.3.111/32 gateway=10.0.2.20 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
DST-ADDRESS GATEWAY DISTANCE
;;; Ruta adm por azure
0 Xs 10.0.2.0/24 10.0.1.1 1
;;; ADM por tailscale
1 Xs 10.0.2.0/24 10.0.3.111 1
DAd 0.0.0.0/0 192.168.0.1 1
;;; Ruta red interfaz azure
2 As 10.0.0.0/24 10.0.1.254 1
DAc 10.0.1.0/24 wg_mcc_azure 0
;;; Ruta ADM por wg adm
3 As 10.0.2.0/24 10.200.2.254 1
DAc 10.0.3.0/24 bridge 0
;;; Ruta azure peers
4 As 10.200.1.0/24 10.0.1.254 1
DAc 10.200.2.0/24 wg_mcc_country 0
DAc 192.168.0.0/24 ether1-internet 0
DAc 192.168.44.0/24 bridge-guardias 0
/ip route
add check-gateway=ping comment="Ruta ADM por wg adm" disabled=no distance=1 dst-address=10.0.2.0/24 gateway=10.200.2.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment="Ruta red interfaz azure" disabled=no distance=1 dst-address=10.0.0.0/24 gateway=10.0.1.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment="Ruta azure peers" disabled=no distance=1 dst-address=10.200.1.0/24 gateway=10.0.1.254 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="Ruta adm por azure" disabled=yes distance=1 dst-address=10.0.2.0/24 gateway=10.0.1.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add comment="ADM por tailscale" disabled=yes distance=1 dst-address=10.0.2.0/24 gateway=10.0.3.111 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
Azure:
DST-ADDRESS GATEWAY DISTANCE
DAd 0.0.0.0/0 10.0.0.1 1
DAc 10.0.0.0/24 ether1 0
DAc 10.0.1.0/24 wg_mcc_azure 0
;;; Ruta a administraciF3n
0 As 10.0.2.0/24 10.0.1.1 1
;;; Ruta a guardia
1 As 10.0.3.0/24 10.0.1.2 1
DAc 10.200.1.0/24 wg-azure-peers 0
DAd 168.63.129.16/32 10.0.0.1 1
DAd 169.254.169.254/32 10.0.0.1 1
/ip route
add check-gateway=ping comment="Ruta a administraci\F3n" disabled=no distance=1 dst-address=10.0.2.0/24 gateway=10.0.1.1 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
add check-gateway=ping comment="Ruta a guardia" disabled=no distance=1 dst-address=10.0.3.0/24 gateway=10.0.1.2 pref-src="" routing-table=main scope=30 suppress-hw-offload=no target-scope=10
Wireguard peers config for each site:
Building1:
To building2 - Allowed address: 10.200.2.252/32, 10.0.3.0/24
To Azure - Allowed address: 10.0.0.4/32, 10.0.1.0/24, 10.200.1.0/24
Building2:
To buildin1 - Allowed address: 10.200.2.254/32, 10.0.2.0/24
To azure - Allowed address: 10.0.0.4/32, 10.0.1.0/24, 10.200.1.0/24
Azure:
To building1 - Allowed address: 10.0.1.1/32, 10.0.2.0/24
To building2 - Allowed address: 10.0.1.2/32, 10.0.3.0/24
I initially disabled the building1-building2 wireguard connection, but i found my cloud tunnel to be somewhat slow (demo license applied) bunno if it was a thing of the moment or if i will be in trouble with it in the future.
Besides that, i have NO idea how i could enable both, and have the routers use the direct building to building tunnel and only jump to the cloud one if the direct connection is not available (i thought about using routes with different distance metrics, BUT, wireguard seems incompatible with having 2 peers with the “allowed address” for a same io/ip range (if i declare 10.0.2.0/24 in 2 peers, the last one that connects is the only one that works, it seems).
Besides that, i have it working.
Now, what i failed to get working:
Redirections to expose services to the public from the cloud
Port 4091: to building1 – 10.0.2.20:4091
Port 8444: to building2 – 10.0.3.111:443
Port 6080: to building2 – 10.0.3.111:80
Port 6021: to building2 – 10.0.3.111:21
Ideally, either from the public IP of azure or building 1, i need to expose the above prots and have them redirected to a specific internal IP, and then have communication return to internet from where it was received (either azure or building2, azure for everything would be ideal).
I allowed the needed ports in the Azure Firewall and then tried to use dst-nat rules on the CHR indicating to dst-nat from those external ports to the internal ones mentioned above, and to the internal IP mentioned there.
That did not work, but i was unable to test too much due to unforseen issues.
In any case, i would love some help/pointers to how i should go to get this last step working (And also recommendations on what to learn about OSFP or other routing stuff that could help me have a better setup, and also the backup/redundant tunnel/routes thing).