I have two NICs eno1 (ip: 12.34.56.78) and eno2 (44.55.66.77).
I also have a service on a specific port (lets say 8888) running.
I want to allow traffic over eno1 to that service, but want to drop any packet to that port over eno2.
I tried it with the following iptables
rule:
iptables -A INPUT -i eno2 -p tcp --dport 8888 -j DROP
Also with this (some of my rules have this strange garbage keyword in it):
iptables -A INPUT -i eno2 -p tcp -m tcp --dport 8888 -j garbage
But still the service is available over both NICs and their corresponding ips.
Please enlighten me about this.
The service is running as a docker container.
EDITs for comments:
iptables -S
contains:
-P INPUT DROP