Docker iptables5/15/2023 However adding at least one of them could maybe be helpful. Left initially my different tries out to not overcomplicate the question. Can anybody help me and tell me how I have to change the above file? However If I create a container with "-p 123:123" everybody can access it. Just allow access to ports 22 and 80 and also allow port 123 from the ip 1.2.3.4. A INPUT -s 1.2.3.4 -p tcp -m tcp -dport 123 -j ACCEPT A INPUT -p tcp -m tcp -dport 80 -j ACCEPT A INPUT -p tcp -m tcp -dport 22 -j ACCEPT A INPUT -m conntrack -ctstate RELATED,ESTABLISHED -j ACCEPT My iptable looked originally like that (so before my many unsuccessful attempts): *filter ![]() That if I have an ACCEPT-Rule to go through and if not it gets blocked. However not sure what I am doing wrong but it never does what I expect it to do. Also saw that there was big change in recent docker versions with a special DOCKER-chain that should allow me to do that. Tried a lot of different things the last days. ![]() I am not incredible experienced with Docker nor iptables. ![]() Just realized a few days ago that Docker seems to bypass my iptable rules.
0 Comments
Leave a Reply. |