By default configurations, why is mysql server accepting nonlocal request, while postgresql server is not?
$ nmap -p0-65535 192.168.1.97
Starting Nmap 7.60 ( https://nmap.org ) at 2019-03-20 14:34 EDT
Nmap scan report for ocean.fios-router.home (192.168.1.97)
Host is up (0.00036s latency).
Not shown: 65533 closed ports
PORT STATE SERVICE
22/tcp open ssh
3306/tcp open mysql
33060/tcp open mysqlx
Nmap done: 1 IP address (1 host up) scanned in 4.50 seconds
Can netstat
tell me the reason?
$ sudo netstat -ap | grep postg
tcp 0 0 localhost:postgresql 0.0.0.0:* LISTEN 1567/postgres
udp 0 0 localhost:57504 localhost:57504 ESTABLISHED 1567/postgres
unix 2 [ ACC ] STREAM LISTENING 27116 1567/postgres /var/run/postgresql/.s.PGSQL.5432
$ sudo netstat -ap | grep mysql
tcp6 0 0 [::]:mysql [::]:* LISTEN 23683/mysqld
tcp6 0 0 [::]:33060 [::]:* LISTEN 23683/mysqld
unix 2 [ ACC ] STREAM LISTENING 1169294 23683/mysqld /var/run/mysqld/mysqld.sock
unix 2 [ ACC ] STREAM LISTENING 1169513 23683/mysqld /var/run/mysqld/mysqlx.sock
unix 2 [ ] DGRAM 1169211 23683/mysqld
How can I configure mysql work like postgresql, so that it is running but not accepting nonlocal request?
Thanks.
ufw
is a simple one,gufw
is its graphical-user-interface. (It is a front end to ip-tables.) On any debian based system just doapt-get install gufw
, then you can dogufw &
. At the top you specify the default rules e.g. incoming = Deny. The you can override by allowing services/ports – ctrl-alt-delor Mar 20 '19 at 18:54