# Setting up proper routing in FreeBSD-9.1



## jonfr (Jan 25, 2014)

Since my WAN router box has started to fail I wanted to move my internet routing from it to my FreeBSD-9.1 server. I have read the handbook on routing and few topics on how to do this. But I was not able to make it work for IPv4. My IPv6 routing works when I move the Ethernet cable to the FreeBSD-9.1 server since it is already properly set-up.

This is my current set-up in rc.conf.


```
#ifconfig_rl0="DHCP"
#gateway_enable="YES"
#static_routes="internalnet1"
#route_internalnet2="-net [external IP]/25 192.168.1.1"

#pf_enable="YES"
#pf_rules="/etc/pf.conf"
#pf_flags="
```

What I also need to do is to set-up a port-forward for several of my local LAN computers and one VoIP box. This is for several things that I use and need direct access to the internet. I also need to be able to block ssh and port 80 from the internet on the server. Since I don't want to have it on the internet. 

Thanks for the help.


----------



## jonfr (Jan 25, 2014)

Is this an workable sample that I can use for my port-forwarding on FreeBSD-9.1. It is from the year 2004 and is old. I am not sure if the commands are correct in this example.

Creating a FreeBSD Firewall using PF


----------

