View Single Post
  #5   (View Single Post)  
Old 24th March 2011
Daffy Daffy is offline
Fdisk Soldier
 
Join Date: Jun 2010
Posts: 73
Default

So it's time for me to post my first pf.conf and hope it's not a complete fail :

Code:
# macros defined
int_if="ale0"
localnet = $int_if:network
tcp_services = "{ ssh, 62222, www }"
udp_services = "{ ssh, 62222, www }"

# tables
table <bruteforce> persist file "/etc/bruteforce"

# block rules
block all
block quick from <bruteforce>

# pass rules
pass inet proto tcp to $localnet port $tcp_services \
	keep state (max-src-conn 100, max-src-conn-rate 20/5, \
		overload <bruteforce> flush global)
And the questions:
- is this going to work? I expect to be able to do simple browsing, be able to ssh to this machine (main desktop) and keep port 62222 open (for transmission). So as far as I can tell, in the macros ssh is port 22, www is port 80 and 62222 is... well, 62222.

- the macro "localnet = $int_if:network", is used to filter my traffic and the traffic from other pcs connected to my desktop?

Those are the questions that come to my mind for now. Back to reading and I'll be coming with more.


Thank you.
Reply With Quote