Hi guys i need some help writing my rule set for the office lan here where i work, so i can get the network connected to the internet with nat, and just a few ports allowed for the network operate as it should. But im having issues trying to deny specific hosts or better said the rest of the hosts and allow just some of them to connect to another host.
For better explanation here is my ruleset.
Any ideas of what im doing wrong ?
For better explanation here is my ruleset.
Code:
#by flx-
#Interfaces and Common Ports
externa="vr0"
interna="xl0"
red="{192.168.0.0/24}"
tcp_serv="{ssh, smtp, domain, http, ftp-data, ftp\
pop3, auth, https, pop3s, 465, 3128, 8080,1863,6667}"
udp_serv="{domain, bootps, 3128, bootpc, ftp, ftp-data}"
denegados="{ssh, 3128, 8080, ftp, ftp-data}"
ecepciones="{192.168.0.3}"
table <adm-mr> persist file "/etc/maquinas/adm-mr"
table <lan> persist {192.168.0.0/24}
#Global PF Settings
set optimization high-latency
set block-policy drop
set skip on lo
#Normalization
scrub in all
#Nat
nat on $externa from $red to any -> $externa
#Rdr
rdr on $interna proto { tcp, udp } from any to any port 80 -> $interna port 3128
#Filtering
block log all
pass out log on $interna proto {tcp udp} from {<adm-mr>!<lan>} to qc-base
pass log proto tcp from any to any port $tcp_serv keep state
pass log proto udp to any port $udp_serv keep state
pass log inet proto icmp from any to any icmp-type echoreq keep state
Any ideas of what im doing wrong ?