# New at PF need help.



## concept (Nov 9, 2011)

Hi, I'm all new to FreeBSD and I have just installed pf. The machine with FreeBSD is connected to a router where the broadband modem is connected.

After I installed pf, the net was gone and all inbound and outbound activity are gone. I'm kind of lost on setting the rule on pf.conf. If I'm right my external_nic is vr0? but what is lo0 and which is going to be my internal_nic? Thanks in advance.


----------



## concept (Nov 9, 2011)

Oh sorry.. vr0 is my internal_nic.


----------



## graudeejs (Nov 9, 2011)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/firewalls.html

lo0 is loopback interface


----------



## pbd (Nov 9, 2011)

concept said:
			
		

> After i installed PF, the net was gone and all inbound and outbound activity are gone.



Can you post your /etc/pf.conf?



			
				concept said:
			
		

> I'm kind of lost on setting the rule on pf.conf. If I'm right my external_nic is vr0? but what is lo0 and which is going to be my internal_nic? Thanks in advance.



lo() is the loopback interface. We can guess what is your external and internal interface (if there's one - do you have more than one physical network interfaces?).


----------



## concept (Nov 9, 2011)

Well actually I have been trying out what I can right now but I deleted my pf.conf. But this is what I have been using everytime I tried.


```
# Macros
int_if="vr0"

# Default
block all

pass in on $vr0 from 192.168.1.1  to any
```
/* 192.168.1.1 as my router ip */


----------



## concept (Nov 9, 2011)

I have two interface actually, but I'm not using the other one. The vr0 is connected to router via cable.


----------



## pbd (Nov 9, 2011)

Firt of all, use either 
	
	



```
pass in on [B]$int_if[/B] from 192.168.1.1 to any
```
 or 
	
	



```
pass in on [B]vr0[/B] from 192.168.1.1 to any
```

Next, by this you are blocking all outgoing communication and accepting only incoming communication from 192.168.1.1.

If you want to block all incoming connections (you don't want to run any services on the machine) and allow every communication from this machine, try this:


```
int_if="vr0"
block in all
pass out on $int_if to any
```


----------



## concept (Nov 10, 2011)

Great! Thanks, that helps a lot. I could start from here. Thanks again.


----------

