Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restrict connections to the Docker daemon - What should be the value of ext_if [closed]

I tend to restrict connections to my Docker daemons, using host iptables

https://docs.docker.com/network/iptables/#restrict-connections-to-the-docker-daemon

The example given is

$ iptables -I DOCKER-USER -i ext_if ! -s 192.168.1.1 -j DROP

I was wondering, what should be the value of ext_if, and how I can figure out the value for ext_if?

like image 647
Cheok Yan Cheng Avatar asked Sep 14 '25 15:09

Cheok Yan Cheng


1 Answers

This works pretty well for me

iptables -I DOCKER-USER -i eth0 -p tcp --dport 5555 -j DROP

However, I'm not sure the correct step, to get eth0. It is just my try-n-error way.

like image 129
Cheok Yan Cheng Avatar answered Sep 16 '25 07:09

Cheok Yan Cheng