IP Tables und mySQL ;-)

Rund um die Sicherheit des Systems und die Applikationen
Post Reply
timmithe2
Posts: 83
Joined: 2003-07-05 16:31
 

IP Tables und mySQL ;-)

Post by timmithe2 »

Hallo,

ich gebe zu so gründlich habe ich mich noch nicht mit IPTable
befasst aber das was ich vorhabe ist ne recht triviale Sache
evenetuell mag mir jmd. helfen.

Ich möchte den mySQL Port nur für 2 bestimmte Server
auf meinem Server öffnen und habe deshalb den Port
3306 in mySQL geöffnet. Das klappt auch 1a ;-)

Folgende IPTable habe ich jetzt als Schutz erstellt:

Code: Select all

iptables --flush
iptables -A INPUT -p tcp --dport 3306 -j DROP
iptables -A INPUT -p tcp --sport 3306 -s 81.169.137.82 -j ACCEPT
iptables -A INPUT -p tcp --sport 3306 -s 127.0.0.1 -j ACCEPT 
Leider kommt jetzt kein Server mehr durch
hat jmd. ne Idee was falsch ist.

Grüße Tim
toberkel
Posts: 86
Joined: 2004-07-16 17:22
Location: Hamburg
Contact:
 

Re: IP Tables und mySQL ;-)

Post by toberkel »

verstehe ich das richtig das auf deinen server wo mysql läuft, 2 andere server zugreifen sollen? wenn ja, muss es in den beiden letzten zeilen nicht --sport sondern --dport heissen...

mfg toberkel
fox-t.c
Posts: 14
Joined: 2005-03-22 08:41
 

Re: IP Tables und mySQL ;-)

Post by fox-t.c »

du solltest alles incoming dropen dann was du brauchst freischalten nicht umgedreht mach mal

"iptables -L" standart steht alles auf Accept stell das auf drop und dann schlate nach und nach alles frei (ssh vorher sonst wars das) :)
powie
Posts: 80
Joined: 2002-09-25 16:41
Location: Singen
Contact:
 

Re: IP Tables und mySQL ;-)

Post by powie »

timmithe2
Posts: 83
Joined: 2003-07-05 16:31
 

Re: IP Tables und mySQL ;-)

Post by timmithe2 »

Oh Man ;-) Ich bin auch ein Honk jetzt ist es natürlich klar.

Vielen Dank für die Hilfe, ich werde mir die Seite am Wochenende
mal in aller Ruhe durch lesen.

Grüße Tim
Post Reply