NEW FEATURE: Back to Home VPN

Hi, I have a problem with the correct connection between Wireguard BTH and AdGuard Home, namely - AdGuard Home placed on the container, VETH interface in the main bridge, AdGuard address set as DNS in the DHCP server, Wireguard works properly as it should, I have access via a connection VPN with internal network, etc. - generally works, with one exception - in the Wireguard Client on Android, DNS set as the AdGuard address, it also works, but in the AdGuard admin panel in the logs this connection is shown at the Router’s gateway address, not as the address assigned in Wireguard - the question is what to do that it works with Wireguard address in AdGuard admin panel? Thank you in advance for your help.

I suppose you can create a /ip/firewall/nat action=src-nat rule so the VETH’s IP be masqueraded to router’s WG address, when going out wireguard. Issue is the LAN subnet (including VETH) is likely already allowed addresses, so VETH is just another bridge member, so it use the router’s IP and thus using normal WAN NAT rule.

But I used Zerotier and in this case in AdGuard admin panel I saw ip address from Zerotier.

What does “use local address” mean?

If your router is behind another router, enabling this checkbox will update the ddns entry with its local address (e.g. 192.168.1.x).

It was just one suggestion. BTH I believe NAT’s everything via dynamically added NAT masquerade rule and that’s what you’re running into. Hard to visualize without config… but maybe better to use an accept rule for the dst-address of your AdGuard container, and place before the BTH NAT rule.

In other words — It the the default BTH NAT rule’s behavior you need work-around since you can’t disable BTH’s NAT rule that’s added automatically by RouterOS.

If ZeroTier is working, one less thing to worry about— it’s just different than BTH. :wink:

I’m rather beginer with Mikrotik, so can You write me, how should look NAT rule, which I need to place before this dynamic BTH NAT rule?

Hard to do this blind without config. And there may be other solutions and/or other firewall may effect solution… but something like this:

/ip/firewall/nat add action=accept protocol=udp port=53 src-address=192.168.216.2 place-before=0 chain=src-nat
/ip/firewall/nat add action=accept protocol=tcp port=53 src-address=192.168.216.2 place-before=0 chain=src-nat

The action=accept say to not NAT traffic from WG BTH peer’s IP to UDP or TCP to the DNS port 53, since the BTH NAT rule (e.g. with the “D” in left most column) is first by default, these need to be before that rule, which is what the place-before=0 does. You can do same in winbox creating IP > Firewall > NAT, setting protocol, port, etc. and dragging the new rules to the first in the list.

What I don’t know myself is how aggressive BTH’s dynamic NAT rule is… e.g. will BTH NAT rule will move itself first in list via some reboot/background process/config changes.

Thank You very much for help - it works! :+1::slightly_smiling_face:

i’m using the iPhobe BTH app.
Yesterday I encounterd the app was not able to connect anymore. Reason unknown sofar.

But when I added a new tunnel to the same router everything worked again but…
I then wanted to remove the old tunnel from the app. I could not find a delete option so I had to remove the app and reinstall it again after which I again had to add a new tunnel.

Two questions:

It would be nice to have an delete option for tunnels in the app and
A number somewhere in the configuration to see which router BTH config belongs to which tunnel in the app so it’s easy to remove the old router BTH config’s

The BTH config name matches the system VPN tunnel name already.
We plan to add “delete tunnel” feature in the app.

If you see such a situation that tunnel is not working, make a supout.rif file and email us, maybe support can see what happened.

For the new tunnel I configured the same tunnel name so …

And I’m still running ROS 7.11 beta7 and the iPhone app was updated een week ago or so. My thought was that it could have impact. So I did not open a ticket. Next time I will not think to much myself and leave it to you :slight_smile:

Get into the same issue at least twice and was not able to use VPN. Is there a way to set 443 port?

In your country is there like a whole range of blocked ports, or how does that work?

The last time it happened when I was at Nova Poshta office in Ukraine and tried to connect to my home router to make a call to local Nova Poshta office. I didn’t check ports, but my voice app didn’t work and probably because of the blocked ports, this is why I’ve tried to use BTH. By the end I’ve switched to Skype Out.

I had similar issue in the Romanian Airport.

Dear all concern,
Unexpected behavior of BTH. Sometimes BTH on the Windows wireguard client is connected and works smoothly. After some time it’s not connected and I have tried many times to disable and enable BTH in IP Cloud. but no result still not connecting.
it is not a permanent solution.
I tried many times on many sites on different ISPs but still have the same problem.
I thought the Mikrotik BTH relay server was down??? or maybe there bug in the ROS

Tested right now, relay is working without a problem. Maybe problem is on windows machine ?

Did you try to connect with mobile app ?

Working fine for me as well.

miankamran7100 - could it be a problem with your laptop’s WiFi?
Intel released a new Windows driver these days which finally resolves those random disconnect issues (22.250.1).
Mentioned here: https://www.neowin.net/news/intel-releases-new-wi-fi-and-bluetooth-drvers-for-windows-11-to-fix-connectivity-loss-issues/
and here: https://downloadmirror.intel.com/788770/ReleaseNotes_WiFi_22.250.1.pdf

I have tried to reconnect now it’s working.
I don’t know why it’s happening.

is ther any issue with Back_To_home?

i’m no longer able to ping = 78.28.208.100

actually , my issues is when i’m using LTE im not able to establish back to home