Score:0

In centos7 using iptables how to allow port 3306 for only specific ip

in flag

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

Nikita Kipriyanov avatar
za flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.