elitepvpers

elitepvpers (https://www.elitepvpers.com/forum/)
-   Metin2 PServer Guides & Strategies (https://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/)
-   -   [Release] Pf.conf & ipfw.list [2013 SF By Invoice] (https://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/2684633-release-pf-conf-ipfw-list-2013-sf-invoice.html)

.Yacki 06/26/2013 20:21

[Release] Pf.conf & ipfw.list [2013 SF By Invoice]
 
Hi, ich habe mir die "kleine" Mühe gemacht und euch die pf.conf und ipfw.list geschrieben, für die 2013er SF von Invoice.

PS: HATE IT OR LOVE IT!

Quote:

IPF="ipfw -q add"
ipfw -q -f flush

#loopback
$IPF 10 allow all from any to any via lo0
$IPF 20 deny all from any to 127.0.0.0/8
$IPF 30 deny all from 127.0.0.0/8 to any
$IPF 40 deny tcp from any to any frag

# statefull
$IPF 50 check-state
$IPF 60 allow tcp from any to any established
$IPF 70 allow all from any to any out keep-state
$IPF 80 allow icmp from any to any

# open port ftp (20,21), ssh (22), mail (25)
# http (80), dns (53) etc
$IPF 110 allow tcp from any to any 21 in
$IPF 120 allow tcp from any to any 21 out
$IPF 130 allow tcp from any to any 22 in
$IPF 140 allow tcp from any to any 22 out
$IPF 170 allow udp from any to any 53 in
$IPF 175 allow tcp from any to any 53 in
$IPF 180 allow udp from any to any 53 out
$IPF 185 allow tcp from any to any 53 out

#Für deinen M2 Server
$IPF 200 allow tcp from any to any 11002 in
$IPF 210 allow tcp from any to any 11002 out
$IPF 200 allow udp from any to any 11002 in
$IPF 210 allow udp from any to any 11002 out
$IPF 200 allow tcp from any to any 13099 in
$IPF 210 allow tcp from any to any 13099 out
$IPF 200 allow tcp from any to any 13100 in
$IPF 210 allow tcp from any to any 13100 out
$IPF 200 allow tcp from any to any 13101 in
$IPF 210 allow tcp from any to any 13101 out
$IPF 200 allow tcp from any to any 13102 in
$IPF 210 allow tcp from any to any 13102 out
$IPF 200 allow tcp from any to any 13103 in
$IPF 210 allow tcp from any to any 13103 out
$IPF 200 allow tcp from any to any 13070 in
$IPF 210 allow tcp from any to any 13070 out
$IPF 200 allow tcp from any to any 13071 in
$IPF 210 allow tcp from any to any 13071 out
$IPF 200 allow tcp from any to any 13072 in
$IPF 210 allow tcp from any to any 13072 out
$IPF 200 allow tcp from any to any 13073 in
$IPF 210 allow tcp from any to any 13073 out
$IPF 200 allow tcp from any to any 13074 in
$IPF 210 allow tcp from any to any 13074 out
$IPF 200 allow tcp from any to any 14070 in
$IPF 210 allow tcp from any to any 14070 out
$IPF 200 allow tcp from any to any 14071 in
$IPF 210 allow tcp from any to any 14071 out
$IPF 200 allow tcp from any to any 14072 in
$IPF 210 allow tcp from any to any 14072 out
$IPF 200 allow tcp from any to any 14073 in
$IPF 210 allow tcp from any to any 14073 out
$IPF 200 allow tcp from any to any 14074 in
$IPF 210 allow tcp from any to any 14074 out
$IPF 200 allow tcp from any to any 15070 in
$IPF 210 allow tcp from any to any 15070 out
$IPF 200 allow tcp from any to any 15071 in
$IPF 210 allow tcp from any to any 15071 out
$IPF 200 allow tcp from any to any 15072 in
$IPF 210 allow tcp from any to any 15072 out
$IPF 200 allow tcp from any to any 15073 in
$IPF 210 allow tcp from any to any 15073 out
$IPF 200 allow tcp from any to any 15074 in
$IPF 210 allow tcp from any to any 15074 out
$IPF 200 allow tcp from any to any 16070 in
$IPF 210 allow tcp from any to any 16070 out
$IPF 200 allow tcp from any to any 16071 in
$IPF 210 allow tcp from any to any 16071 out
$IPF 200 allow tcp from any to any 16072 in
$IPF 210 allow tcp from any to any 16072 out
$IPF 200 allow tcp from any to any 16073 in
$IPF 210 allow tcp from any to any 16073 out
$IPF 200 allow tcp from any to any 16074 in
$IPF 210 allow tcp from any to any 16074 out

Quote:

### INTERFACES ###
if = "{ em0 }"

#Intra
table <intranet> { 127.0.0.1 }
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 60, 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 em0 proto tcp from any to any port 22 keep state
pass in quick on em0 proto tcp from any to any port 3306 keep state
pass in quick on em0 proto tcp from any to any port 11002 keep state
pass in quick on em0 proto tcp from any to any port 13070 keep state
pass in quick on em0 proto tcp from any to any port 13071 keep state
pass in quick on em0 proto tcp from any to any port 13072 keep state
pass in quick on em0 proto tcp from any to any port 13073 keep state
pass in quick on em0 proto tcp from any to any port 13074 keep state
pass in quick on em0 proto tcp from any to any port 14070 keep state
pass in quick on em0 proto tcp from any to any port 14071 keep state
pass in quick on em0 proto tcp from any to any port 14072 keep state
pass in quick on em0 proto tcp from any to any port 14073 keep state
pass in quick on em0 proto tcp from any to any port 14074 keep state
pass in quick on em0 proto tcp from any to any port 15070 keep state
pass in quick on em0 proto tcp from any to any port 15071 keep state
pass in quick on em0 proto tcp from any to any port 15072 keep state
pass in quick on em0 proto tcp from any to any port 15073 keep state
pass in quick on em0 proto tcp from any to any port 15074 keep state
pass in quick on em0 proto tcp from any to any port 16070 keep state
pass in quick on em0 proto tcp from any to any port 16071 keep state
pass in quick on em0 proto tcp from any to any port 16072 keep state
pass in quick on em0 proto tcp from any to any port 16073 keep state
pass in quick on em0 proto tcp from any to any port 16074 keep state
pass in quick on em0 proto tcp from any to any port 13099 keep state
pass in quick on em0 proto tcp from any to any port 13100 keep state
pass in quick on em0 proto tcp from any to any port 13101 keep state
pass in quick on em0 proto tcp from any to any port 13102 keep state
pass in quick on em0 proto tcp from any to any port 13103 keep state
pass out all keep state
Einfügen ins /etc Verzeichnis, für die, die es nicht wissen ;)

Und nochmal: Ich will kein geflame hören, ihr müsst mir noch nicht einmal dafür danken! Bitte, nehmt es und gebt nichts!

.Minton™ 06/26/2013 20:24

very nice thank you :)

x'Kyubi 06/26/2013 20:25

Nett das du dir die mühe gemacht hast, auch wenn sie klein war wie du das sagst.^^

#Saiirex 06/26/2013 20:36

Wozu ist das gut?

ZyoX 06/26/2013 20:43

Quote:

Originally Posted by xKoRe' (Post 23496477)
Wozu ist das gut?

Sicherheit?!

Eine Firewall für deinen M2-Server bzw. die entsprechendne Scripts.

wvoron 06/26/2013 21:11

thank you

TheRzR 06/26/2013 22:12

1 : 0 für die Faulheit.
Thanks :)

.Ravage 06/26/2013 22:34

Wieso ipfw wenn du die eigentliche Filterung nur mit pf machst? Du machst bei ipfw ja nichts weiter als die ports öffnen, die in pf ebenfalls offen sind, nur dass bei pf noch zusätzlich limitierungen reingemacht wurden.

Beide scripts finde ich überhaupt nicht so wirklich gut, wenn ich ehrlich bin. Nett, dass du dir die mühe gemacht hast, aber bei beiden firewalls schöpfst du nicht einmal ansatzweise die möglichkeiten aus, die du haben könntest. Nicht einmal die methoden, die hier in epvp bekannt sind.

btw. solche "nehmt es und gebt nichts"-Kommentare sind hier völlig überflüssig. Das ist ein Forum, wir geben gerne Pro und Contra.

Gl0bal 06/27/2013 00:08

Generell ist es eigentlich überflüssig beides zu haben pf reicht. Außerdem finde ich deine pf nicht so schön wo ist die IP Whitelist für Mysql und SSH?

Trotzdem thx fürs teilen^^ aber klatscht einfach dir pf von johnsilver rauf und ändert dir ports dürfte eig nicht so schwer sein

MfG

-Exzellent- 06/27/2013 00:10

Danke für den Release!

.Harlem² 06/27/2013 00:11

Danke, aber wieso habt ihr keine spanne eigebaut? währe doch einfacher gewesen...

Silver™ 06/27/2013 00:11

Wenn man will kann man sie sofort entfernen (natürlich nur auf der Virtuellen Maschine zum Aufbauen)

RedKing2 06/27/2013 11:47

1. IPFW und PF sind dasselbe
2. PF ist besser als IPFW, hat mehr Funktionen
3. Wenn du nicht Kritik fähig bist dann release nichts du nappel, weil deine PF nicht funktioniert, sie ist fehlerhaft!!!!! Wer bisschen Ahnung von OpenBSD hat, weiß dass
er diese PF nicht zum Schutz benutzen kann, auch wenn der Server beim ach so tollen Start über die rc Funktion keinen Fehler der PF abgibt sondern diese dann einfach "OFF" lässt.

PS: Alle PFs die hier in Epvp Pub sind funktionieren nicht, weil sie alle einen logistischen Fehler enthalten.

mfg

Silver™ 06/27/2013 13:19

Quote:

Originally Posted by [SA]RedKing (Post 23504959)
1. IPFW und PF sind dasselbe
2. PF ist besser als IPFW, hat mehr Funktionen
3. Wenn du nicht Kritik fähig bist dann release nichts du nappel, weil deine PF nicht funktioniert, sie ist fehlerhaft!!!!! Wer bisschen Ahnung von OpenBSD hat, weiß dass
er diese PF nicht zum Schutz benutzen kann, auch wenn der Server beim ach so tollen Start über die rc Funktion keinen Fehler der PF abgibt sondern diese dann einfach "OFF" lässt.

PS: Alle PFs die hier in Epvp Pub sind funktionieren nicht, weil sie alle einen logistischen Fehler enthalten.

mfg

Epic Fail bro :awesome:

.Yacki 06/27/2013 13:38

Quote:

Originally Posted by .Ravage (Post 23499193)
Wieso ipfw wenn du die eigentliche Filterung nur mit pf machst? Du machst bei ipfw ja nichts weiter als die ports öffnen, die in pf ebenfalls offen sind, nur dass bei pf noch zusätzlich limitierungen reingemacht wurden.

Beide scripts finde ich überhaupt nicht so wirklich gut, wenn ich ehrlich bin. Nett, dass du dir die mühe gemacht hast, aber bei beiden firewalls schöpfst du nicht einmal ansatzweise die möglichkeiten aus, die du haben könntest. Nicht einmal die methoden, die hier in epvp bekannt sind.

btw. solche "nehmt es und gebt nichts"-Kommentare sind hier völlig überflüssig. Das ist ein Forum, wir geben gerne Pro und Contra.

Natürlich tut ihr das, interessiert mich auch nicht sonderlich, aber irgendwann beleidigt ihr euch alle hier und dann sind alle traurig und fragen sich wieso ;D


Quote:

Originally Posted by [SA]RedKing (Post 23504959)
1. IPFW und PF sind dasselbe
2. PF ist besser als IPFW, hat mehr Funktionen
3. Wenn du nicht Kritik fähig bist dann release nichts du nappel, weil deine PF nicht funktioniert, sie ist fehlerhaft!!!!! Wer bisschen Ahnung von OpenBSD hat, weiß dass
er diese PF nicht zum Schutz benutzen kann, auch wenn der Server beim ach so tollen Start über die rc Funktion keinen Fehler der PF abgibt sondern diese dann einfach "OFF" lässt.

PS: Alle PFs die hier in Epvp Pub sind funktionieren nicht, weil sie alle einen logistischen Fehler enthalten.

mfg

Dankeschön, aber ich bin kritikfähig, mich regt es nur auf, wenn sich hier tausend Leute beschweren, weil sie sich dann irgendwann untereinander beleidigen und das artet dann aus.

Nein, es ist nicht dasselbe

IPFW = Internet Protocol Firewall
PF = Packet Filter

Wenn du da keinen Unterschied siehst, dann ok :rolleyes:

Btw. bei mir funktioniert sie ^.^ einwandfrei! Könnte sein das du nicht em0 benutzt.

BeriY von Baron 06/27/2013 14:08

-Exzellent- Ist KEIN ein Scammer!

RedKing2 06/27/2013 15:16

Quote:

Originally Posted by .Yacki (Post 23506503)
Natürlich tut ihr das, interessiert mich auch nicht sonderlich, aber irgendwann beleidigt ihr euch alle hier und dann sind alle traurig und fragen sich wieso ;D




Dankeschön, aber ich bin kritikfähig, mich regt es nur auf, wenn sich hier tausend Leute beschweren, weil sie sich dann irgendwann untereinander beleidigen und das artet dann aus.

Nein, es ist nicht dasselbe

IPFW = Internet Protocol Firewall
PF = Packet Filter

Wenn du da keinen Unterschied siehst, dann ok :rolleyes:

Btw. bei mir funktioniert sie ^.^ einwandfrei! Könnte sein das du nicht em0 benutzt.

pfctl -vnf /etc/pf.conf
Verwende diesen Befehl und du siehst dass darin ein Fehler ist. Falls nicht musst du noch was dazu editiert haben was in deinem Thread fehlt. PF's werden bis zum Fehlerpunkt dennoch weiterarbeiten weshalb der trügerische Schein von "Funktionalität" entsteht.

pfctl -F all -f /etc/pf.conf wird er deshalb nicht laden.

Ich habe selbst em0 und der Typ der vor mir geschrieben hat epic fail bro soll man nicht so viel Klugscheißen, wenn man nur Luft in der Birne hat.

War auch nicht böse gemeint mit deiner Kritikfähigkeit, aber so hört es sich an von deinem thread. Klar ist es dasselbe und nicht wirklich sinnvoll beide gleichzeitig laufen zu lassen. Eines von beiden genügt und ich persönliche empfehle da eher PF aufgrund des erhöhten Funktionsumfangs.

Wollte im Prinzip nur vorwarnen dass deine PF nicht (anständig, wenn überhaupt) geht, selbst wenn hier tausend Klugscheißer anderer Meinung sind. Da ist ein kleiner Fehler enthalten, obwohl die PF von oben links bis nach unten rechts sich das teil durchliest, muss eine gewisse Reihenfolge diverser Protokolle beachtet werden. Mit den oben genannten Befehl wird der Fehler dargestellt.

mfg


All times are GMT +2. The time now is 14:29.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.