I have in my local network some docker containers with firefox that running on different ports like 5801, 5802, etc. So that only the device from which the launch was requested was accessible, i used the following command like this:
iptables -I INPUT \! --src 1.2.3.4 -m tcp -p tcp --dport 5801 -j DROP
where 1.2.3.4
is a user IP.
But now i have made domain names for these containers. They work fine, but now anyone can connect to any container. So my question is, how do i allow only one user to access only one domain and drop everyone else?
For example:
- user1 launch container1 with domain name
sub1.domain.example
- user2 launch container2 with domain name
sub2.domain.example
And user1 should only have access to sub1.domain.example
; user2 - only to sub2.domain.example
.
I already tried to use ipset, but got this:
ipset v6.23: Cannot open session to kernel.
My server is a Synology NAS.