Game-Play Zone # Its all about gaming
Forum dedicat jocurilor online si single player aici gasesti tutoriale ghiduri si resurse de cea mai buna calitate. Inregistreaza-te pentru a putea avea acces la cele mai noi stiri in materie de gaming.
ENG:Welcome please REGISTER to see download links and images.
Game-Play Zone # Its all about gaming
Forum dedicat jocurilor online si single player aici gasesti tutoriale ghiduri si resurse de cea mai buna calitate. Inregistreaza-te pentru a putea avea acces la cele mai noi stiri in materie de gaming.
ENG:Welcome please REGISTER to see download links and images.

Protectie server metin2

In jos

Protectie server metin2 Empty Protectie server metin2

Mesaj Scris de OkSeNRo Dum Sept 20, 2015 6:20 pm

Se numeste Firewall FreeBSD.
Firewalul, opreste conexiunile de intrare, dar poate sa opreasca si conexiuile de iesire.
De aceea s-au creeat regulile IPFW (IPFW rules)
Executa urmatori pasi in ssh (putty)

ee /etc/rc.conf


Adauga in rc.conf urmatorul lucru:

pf_enable="YES"


Dupa care te duci in /etc/ si creezi un fisier pf.conf (daca nu exista) si copiezi tot de aici in pf.conf :

ext_if="eth0"
service_ports="{ 22, 80 }"
game_ports="{ 11002, 13001, 13002, 13003, 13004, 13099 }"
table <trusted_hosts> const { 175.65.3.19 }
table <abusive_hosts> persist

set block-policy drop
set loginterface $ext_if
set skip on lo
scrub on $ext_if reassemble tcp no-df random-id
antispoof quick for { lo0 $ext_if }
block in

pass out all keep state
pass out on $ext_if all modulate state

pass in quick from <trusted_hosts>
block in quick from <abusive_hosts>

pass in inet proto icmp all icmp-type echoreq

pass in on $ext_if proto tcp to any port $service_ports flags S/SA keep state \
(max-src-conn 30, max-src-conn-rate 15/5, overload <abusive_hosts> flush)

pass in on $ext_if proto {tcp,udp} to any port $game_ports flags S/SA keep state \
(max-src-conn 30, max-src-conn-rate 15/5, overload <abusive_hosts> flush)


Acum sa ne ocupam de configurare si de explicatii :

-ext_if="eth0" Modifica valoarea pentru a reflecta interfața publică. Poti vedea acest lucru cu comanda ifconfig
-service_ports Aici pui porturile utilizate de serviciile pornite. Cum ar fi mysql, appache, ssh..
-game_ports Porturile utilizate de canalele metin2 si auth . Port la baza de date nu este necesar deoarece nu necesita conexiuni de iesire.
-table <trusted_hosts> const Aici inlocuiesti cu Ip tau si restu la ip care doresti sa aiba acces.


Baga urmatoarele comenzi :

- kldload pf
- pfctl -f /etc/pf.conf



Daca totul a iesit asa cum trebuie iti apare urmatorul mesaj:

No ALTQ support in kernel
ALTQ related functions disabled
OkSeNRo
OkSeNRo
Admin

Mesaje : 154
Bani Cash : 457
Contributie : 0
Data de inscriere : 20/09/2015
Varsta : 29
Localizare : Bucuresti

https://gp-zone.forum.st

Sus In jos

Sus

- Subiecte similare

 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum