PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : mysql port nicht geblockt, und doch nicht offen



H-net
11.07.05, 13:40
hi...

ich habe einen mysql-server... local kann ich wunderbar darauf zugreifen, und ein locales nmap -sT sag mir:

PORT STATE SERVICE
9/tcp open discard
13/tcp open daytime
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
37/tcp open time
53/tcp open domain
80/tcp open http
110/tcp open pop3
143/tcp open imap
783/tcp open hp-alarm-mgr
953/tcp open rndc
3306/tcp open mysql
da ist mysql also offen....

nun habe ich eine iptables-firewall, und habe hier den port 3306 freigegeben, aber ein externes nmap -sT sagt:
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
143/tcp open imap
445/tcp filtered microsoft-ds
hier ist der port nicht offen, udn ich kann logischer weise auch keine sql-anfragen an meinen server schicken...

WORAN KANN DAS LIEGEN? mei niptables script muss in ordnugn sein, da ich ja auch z.b. 80 freigegeben habe und das ja funktioniert...

HILFE!

wär toll wen nihr mir helfen könntet...
gruß

carstenj
11.07.05, 14:12
Hallo,

das kann z. B. daran liegen, dass MySQL nur auf 127.0.0.1 lauscht, somit nicht nach außen erreichbar ist. Gib mal "netstat -na | grep 3306" ein und schau, wo MySQL tatsächlich lauscht.

EDIT: Oder alternativ lsof -i :3306

pitu
11.07.05, 14:26
-p <port ranges>
This option specifies what ports you want to spec*
ify. For example "-p 23" will only try port 23 of
the target host(s). "-p 20-30,139,60000-" scans
ports between 20 and 30, port 139, and all ports
greater than 60000. The default is to scan all
ports between 1 and 1024 as well as any ports
listed in the services file which comes with nmap.


oder aber du hast es gar nicht erst gescannt ...

H-net
11.07.05, 16:12
also mit meinem nmap -sT hab ich schon auch spetiell den port 3306 gescannt... er steht auf closed....


jena1 ~ # netstat -na | grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

Was heißt das? das er nur auf localhost schaut? wie ändere ich das?

gruß
ps: danke für die schnellen antworten

temir
11.07.05, 16:20
In der /etc/my.cnf (könnte woanders liegen) :
bind-address 127.0.0.1 auf Kommentar setzen.

H-net
11.07.05, 16:40
perfekt.... funzt....

VIELEN DANK