Hello everybody
Here is my use case:
2 houses :
Each house has a network with 4g router and home assistant within hassio and tailscale add-on
I bought a simple vps server for redirections from any computer , especially computer without tailscale program installed
The goal is to enter [Public IP address of vps]:8123 to access home assistant in one house.
With one redirection VPS works fine with iptables and redirection of port 8123 to port 8123 of house 1 Tailscale IP address
Iptable -A PREROUTING -i eth0 -o tailscale0 -m TCP --dport 8123 -j DNAT --to-destination [tailscale IP home assistant 1]:8123
Iptable -A POSTROUTING -d [tailscale IP home assistant 1]/32 -o tailscale0 -p tcp -m tcp --dport 8123 -j SNAT --to-source [tailscale IP vps server]
But on the same VPS , when I try iptable with port 8124 to redirect to house 2 home assistant port 8123 it doesn’t work.
Iptable -A PREROUTING -i eth0 -o tailscale0 -m TCP --dport 8124 -j DNAT --to-destination [tailscale IP home assistant 2]:8123
Iptable -A POSTROUTING -d [tailscale IP home assistant 2]/32 -o tailscale0 -p tcp -m tcp --dport 8124 -j SNAT --to-source [tailscale IP vps server]
Any suggestion / idea to resolve this situation and to have
[Public IP address of vps]:8123 pointing to home assistant house 1 port 8123
and
[Public IP address of vps]:8124 pointing to home assistant house 2 port 8124
Or any other port if it could works ?