S
S
SKRSKR2016-10-17 00:40:49
linux
SKRSKR, 2016-10-17 00:40:49

How to deny access to port 3306 iptables?

Shared port 3306 for one external server, and when I write iptables -I INPUT ! -s SP -p tcp --dport 3306 -j DROP (for every fireman) then the server with SP is connected but not via LAN. What to do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
roswell, 2016-10-17
@SKRSKR

iptables -N mysql
iptables -A mysql -s IP1 -j ACCEPT
iptables -A mysql -s IP2 -j ACCEPT
iptables -A mysql -j REJECT # или DROP , что больше подходит по ситуации

iptables -A INPUT -p tcp -m tcp --dport 3306 -m state --state NEW -j mysql

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question