Hi everybody,
I am trying to port my iptables rules from my linux box to my new FreeBSD router (yeah). I want unrestricted access from my internal net (192.168.1.1/24) to the internet, but block all ports from the internal net to the router except ssh. Local traffic on the router shold not be allowed to leave the box.
I am using pf, my conf looks something like this. (Mainly taken from "The book of pf").
This does not work. I can't ping from my router to the internet (ping http://www.google.de). That is the right behaviour. But I cannot ping to the internet from the lan either. When I add the rule "pass out all" it works on all boxes but should not possible on the router.
To state my problem more precisely: with iptables under linux I have in, out and forward rules. How can I emulate forward rules with pf?
I am trying to port my iptables rules from my linux box to my new FreeBSD router (yeah). I want unrestricted access from my internal net (192.168.1.1/24) to the internet, but block all ports from the internal net to the router except ssh. Local traffic on the router shold not be allowed to leave the box.
I am using pf, my conf looks something like this. (Mainly taken from "The book of pf").
Code:
#Devives
ext_if = "tun0"
int_if = "vr1"
localnet = $int_if:network
#nat
nat on $ext_if from $localnet to any -> ($ext_if)
#filter
block all
#allow access to the internet
pass from $localnet to any keep state
#Allow ssh on router from internal net
pass in proto tcp from $localnet to $int_if port 22
This does not work. I can't ping from my router to the internet (ping http://www.google.de). That is the right behaviour. But I cannot ping to the internet from the lan either. When I add the rule "pass out all" it works on all boxes but should not possible on the router.
To state my problem more precisely: with iptables under linux I have in, out and forward rules. How can I emulate forward rules with pf?