iptables inside container doesn't work - NET_ADMIN also didn't help

0

Hi Folks,
I have a container with fail2ban on it. On my development computer when I add this to docker-compose:
Code:

    cap_add:
     - NET_ADMIN
     - NET_RAW

I can see rules are added to iptables both inside container and outside it and it works properly. When I try the same configuration on EC2 instance, i can see those rules inside container, but not on the host system. What's wrong?
Thanks in advance.

aario
질문됨 5년 전645회 조회
1개 답변
0

Decided to give up with the idea and as the alternative, mount log files of the container into equivalent place on the host system. So a standard fail2ban installation would read those log files and set the host system IP tables accordingly. This worked well.

aario
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인