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):
Cod: Selectaţi tot
ee /etc/rc.confCod: Selectaţi tot
pf_enable="YES"Cod: Selectaţi tot
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)-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 :
Cod: Selectaţi tot
- kldload pf
- pfctl -f /etc/pf.confCod: Selectaţi tot
No ALTQ support in kernel
ALTQ related functions disabledSallz


