Register for your free account! | Forgot your password?

You last visited: Today at 03:21

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Sicherheitsfix für PF

Discussion on [Release] Sicherheitsfix für PF within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old 05/15/2011, 12:42   #16
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,916
Received Thanks: 538
pass in quick on re0 proto tcp from any to any port 22 keep state
also muss ich das ^ raus nehmen??

Hab bei mir in /var/db eine neue blacklist datei angelegt. Ist's schlimm?
'oShet is offline  
Old 05/15/2011, 12:59   #17
 
elite*gold: 252
Join Date: Mar 2008
Posts: 3,111
Received Thanks: 3,911
@.Saphira:
Ja, die Sicherheitslücke gibt es auch bei den 07er Files. IPFW sichert die P2P-Ports. admingape_ip (ohne 1!) sichert den Worldport.
Und PF sichert vor dem Bruteforcer bzw. DoS so weit ich das auch mitbekommen habe (der Grund für den Absturz der Server).

@Silfro: Nicht rausnehmen! Sonst ist dein SSH-Port ja nicht mehr frei oder gar geschützt.

So weit ich ja weiß, sollte bei richtiger Konfiguration auch ein syserr nicht mehr auftauchen, der bisher normal immer aufgetaucht ist. Weil er mal wieder bei mir stand, gab es mir zu denken...
.Alessa is offline  
Old 05/15/2011, 14:23   #18
 
heshii''s Avatar
 
elite*gold: 4
Join Date: Sep 2010
Posts: 985
Received Thanks: 337
Danke funktioniert perfekt , fals jemand kein lust hat zu rebooten oä hier sind paar befehle
PHP Code:
pfctl -e     PF aktivieren
pfctl 
-d     PF deaktivieren
pfctl 
-F all -/etc/pf.conf     Alle Filterregeln zurücksetzen (NATFilterZustandTabelleetc.) und erneut aus der Datei /etc/pf.conf auslesen
pfctl 
-Regeln NAT Zustand ]     Bericht über die FilterregelnNAT-Regelnoder Zustandstabellen
pfctl 
-vnf /etc/pf.conf     überprüft /etc/pf.conf auf Fehlerlädt aber das Regelwerk nicht neu 
Quelle FreeBSD.org (*hust*guttenberg*hust*)
heshii' is offline  
Thanks
4 Users
Old 05/21/2011, 09:45   #19
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,916
Received Thanks: 538
wenn ich das mit den ports 3306, 13002, 13003, 13004 und 13061 benutzte, dann funktioniert mysql nicht..
'oShet is offline  
Old 05/21/2011, 13:31   #20
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Hallo,

also ich hab jetzt die pf.conf und bei der roten IP muss da meine IP vom root rein? weil bekomme immer ein syntax error.

Code:
### INTERFACES ###
if = "{ re0 }"

#Intra
table <intranet> { 127.0.0.1 [COLOR="Red"]192.168.2.111[/COLOR] }
pass in quick from <intranet> to any keep state

#Network
table <network> persist
block quick from <network>
pass in on $if proto tcp from any to any \
keep state (max-src-conn 100, max-src-conn-rate 15/1, \
overload <network> flush global)

#ruleset
block in all
pass in quick on lo0
pass out quick on lo0
table <bruteforce> persist file "/var/db/blacklist"
block quick from <bruteforce>
pass in quick on re0 proto tcp from any to any port 22 keep state
pass in quick on re0 proto tcp from any to any port 3306 keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass in quick on re0 proto tcp from any to any port xxxx keep state
pass out all keep state
BackBlack1 is offline  
Old 05/21/2011, 13:46   #21
 
heshii''s Avatar
 
elite*gold: 4
Join Date: Sep 2010
Posts: 985
Received Thanks: 337
Quote:
Originally Posted by BackBlack1 View Post
Hallo,

also ich hab jetzt die pf.conf und bei der roten IP muss da meine IP vom root rein? weil bekomme immer ein syntax error.

Code:
### INTERFACES ###
if = "{ [COLOR="Red"][B]re0[/B][/COLOR] }"

#Intra
table <intranet> { 127.0.0.1 192.168.2.111 }
pass in quick from <intranet> to any keep state

#Network
table <network> persist
block quick from <network>
pass in on $if proto tcp from any to any \
keep state (max-src-conn 100, max-src-conn-rate 15/1, \
overload <network> flush global)

#ruleset
block in all
pass in quick on lo0
pass out quick on lo0
table <bruteforce> persist file "/var/db/blacklist"
block quick from <bruteforce>
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port 22 keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port 3306 keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass in quick on [COLOR="Red"][B]re0[/B][/COLOR] proto tcp from any to any port [COLOR="Red"][B]xxxx[/B][/COLOR] keep state
pass out all keep state
Das was ich dir in rot markiert habe musst du anpassen
heshii' is offline  
Thanks
1 User
Old 05/21/2011, 14:00   #22
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Wenn ich ifconfig mache steht da auch danach:
re0: ....

also ist das ja richtig und bei xxxx stehen meine ports von den configs.
Also ist alles richtig drin aber wieso taucht syntax error auf.
BackBlack1 is offline  
Old 05/21/2011, 14:04   #23
 
heshii''s Avatar
 
elite*gold: 4
Join Date: Sep 2010
Posts: 985
Received Thanks: 337
Ja dann poste mal dein Error hier
heshii' is offline  
Old 05/21/2011, 15:49   #24
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Code:
if = "{ re0 }"
table <intranet> { 127.0.0.1 192.168.2.111 }
table <network> persist
table <bruteforce> persist file "/var/db/blacklist"
/usr/local/pf.conf:29: syntax error
Das ist mein Problem da kommt ein syntax error.
BackBlack1 is offline  
Old 05/21/2011, 15:53   #25
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,916
Received Thanks: 538
hast du im /var/db/ ordner eine "blacklist" datei??
'oShet is offline  
Old 05/21/2011, 17:00   #26

 
alg0r!thm's Avatar
 
elite*gold: 65
Join Date: Aug 2010
Posts: 1,365
Received Thanks: 561
Quote:
Originally Posted by BackBlack1 View Post
Code:
if = "{ re0 }"
table <intranet> { 127.0.0.1 192.168.2.111 }
table <network> persist
table <bruteforce> persist file "/var/db/blacklist"
/usr/local/pf.conf:29: syntax error
Das ist mein Problem da kommt ein syntax error.
Übersetzt in deiner "pf.conf" befindet sich ein Fehler und zwar in der Zeile 29.
Poste am besten mal die oben gennante Zeile, dann können wir dir sicherlich weiterhelfen. :-)


So far,
Daniiel'
alg0r!thm is offline  
Thanks
1 User
Old 05/21/2011, 18:57   #27
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Ja hab dort eine blacklist datei ohne inhalt wie angegeben und die Zeile 29 siehst du oben, da steht das drin "pass out all keep state", also einfach die letzte Zeile.
BackBlack1 is offline  
Old 05/22/2011, 00:52   #28
 
elite*gold: 0
Join Date: Jan 2010
Posts: 1,916
Received Thanks: 538
ganz zum schluss muss noch eine leerzeile.
'oShet is offline  
Old 05/27/2011, 21:03   #29
 
elite*gold: 0
Join Date: Apr 2010
Posts: 223
Received Thanks: 41
Danke ihr habt mir alle sehr geholfen, aber nun mein Problem, ich habe dort ja die richtigen Ports undso eingefügt, aber jetzt werden keine Channels mehr angezeigt. o.O
Wieso werden die Ports jetzt geblockt obwohl die ja eigentlich freigeschaltet sein müssten wegen den Befehlen in der pf.conf.
BackBlack1 is offline  
Old 05/27/2011, 21:47   #30
 
heshii''s Avatar
 
elite*gold: 4
Join Date: Sep 2010
Posts: 985
Received Thanks: 337
Bei mir werden da auch nur "..." angezeigt aber man kann sich einloggen .... ne frage nebenbei ist das auch schutz gegen ddos ? weil da einer meint mein server zu attackieren -.-'
heshii' is offline  
Reply




All times are GMT +2. The time now is 03:21.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.