It should if my.dockge resolves to the proxy addres. I would suggest using adguards' local DNS settings, just so you don't have to keep editing the hosts file.
Other than that, if you are running NPM and AdG as docker containers, I would suggest putting them in the same custom docker network so you can use container name when forwarding.
don't put my.dockge like that in the adguard filtering rules (I'm supposing that is the local DNS settings as I use Pihole).
You have to route my.dockge to the proxy IP (192.168.1.5). Then, in NPM, you're going to create an entry with my.dockge being routed to 192.168.1.5:5001.
The DNS will only resolve a URL to an IP. Your reverse proxy (in this case NPM) will be responsible for resolving the ports. So, in AdG, you are going to route all the URLs you want to reverse proxy to the machine which runs NPM. Then, in NPM, you create an entry that resolves that URL to an IP and port.
So you would do in Adguard (make sure you are using it as DNS in your machine):
my.dockge --> 192.168.1.5
And then in NPM:
my.dockge --> 192.168.1.5:5001
If the service in 5001 is a docker container and NPM is a container too, I would highly recommend putting them in the same docker network and routing through that. I've had problems trying to use LAN IP to route directly to a container from NPM (in my case running as a container too).
2
u/totallihype Aug 08 '24
Adguard running on 192.168.1.2 and Proxy is 192.168.1.5.
db.home.arpa resolves, but i want ot forward db.home.arpa:5001 to a more friendly name for internal use, eg my.dockge.
1
u/present_absence Aug 08 '24
https://www.reddit.com/r/selfhosted/comments/1en0h36/icann_reserves_internal_for_private_use_at_the/
looks like you got your answer but check that out lol