FreeBSD firewall configuration
freebsd at edvax.de
Fri Apr 7 19:00:23 UTC 2017
On Fri, 07 Apr 2017 08:47:04 +0000, Miha Smrekar wrote:
> I started using your system and I have come to firewall configuration. Can
> you tell me how to configure firewall (pf) that I will be able to connect
> with the computer through SSH on port 1024.
If I understand your question correctly, your computer (the
target computer for the SSH connection) will listen on port
1024 for SSH, right? In order to do this, you need to open
that port in your pf.conf, e. g.:
pass in quick on $ext_if inet proto tcp from any to $ext_if port 1024 keep state
where xl0 is the network interface to connect to in my
Also make sure you set sshd's configuration to actually
listen on port 1024 instead of the standard one. ;-)
More information here:
Regarding SSH, read 220.127.116.11. for details. You'll find
much better suggestions for rules there, better than the
basic rules I provided above.
For PF introduction, check those for examples:
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions