I have three servers that are in same network via WireGuard. Their IPs are:
- 10.10.10.1
- 10.10.10.2
- 10.10.10.3
I have a docker container on 10.10.10.1 that give me service on port 8080/tcp. I want 10.10.10.2 to be allowed connect to it but not 10.10.10.3.
I exposed my container port with -e 10.10.10.1:8080:8080
then add below ufw role:
ufw allow from 10.10.10.2 to 10.10.10.1 port 8080 proto tcp
But 10.10.10.3 still can access to this port.