# Limiting access IPFW



## tomsdongle (Dec 22, 2012)

Hello everyone,

I've just finished a fresh install FreeBSD 9.0, the server is an external facing machine that hosts a website and also acts as a minecraft server.

I want to lock down the server and only allow external access on port 80 and 25565.

I also want to enable SSH on 22 but only from my internal range 192.168.**

Would anyone be able to advise?

Many thanks,

Tom


----------



## bbzz (Dec 22, 2012)

Where are you stuck with IPFW?


----------



## G_Nerc (Dec 22, 2012)

```
ipfw deny all from any to me not 80,25565 via ${extif} setup 
ipfw deny all from not 192.168.0.0/16 to me 22 setup
```
I think that lines help You to prevent access to all unwanted services from guests.


----------



## tomsdongle (Dec 22, 2012)

thank you very much G_Nerc

I'll give this a go tonight


----------

