0

I'm trying to setup a rule in iptables where I allow port 3306 with only specific ip. tried this below command, not working. any help could be appreciated.

iptables -A INPUT -p tcp -m tcp -s 122.16.69.56 --dport 3306 -j ACCEPT

Kani
  • 1
  • 1
  • It could be that there are rules in the firewall above this one which block the connection, so it doesn't even check this one. It is generally impossible to properly manage a firewall without seeing it *in its entirety*. Please, [edit your question](https://serverfault.com/posts/1118852/edit) and add the output of `iptables-save` command; you may mask out *public* IPs, but don't change anything else. – Nikita Kipriyanov Dec 26 '22 at 13:34

0 Answers0