Pf: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=/etc/rc.conf= gateway_enable="YES" pf_enable="YES" pf_rules="/etc/pf.conf" pflog_logfile="/var/log/pflog" =/etc/pr.conf= <pre> #################### #…“)
 
 
(16 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 +
=start manual=
 +
*kldload pf
 +
*pfctl -e
 +
=start auto=
 +
*echo 'pf_load="YES"' >>  /boot/loader.conf
 +
 
=/etc/rc.conf=
 
=/etc/rc.conf=
 
  gateway_enable="YES"
 
  gateway_enable="YES"
Zeile 4: Zeile 10:
 
  pf_rules="/etc/pf.conf"
 
  pf_rules="/etc/pf.conf"
 
  pflog_logfile="/var/log/pflog"
 
  pflog_logfile="/var/log/pflog"
=/etc/pr.conf=
+
 
 +
=/etc/pf.conf=
 
<pre>
 
<pre>
 
####################
 
####################
Zeile 42: Zeile 49:
 
pass in all
 
pass in all
 
</pre>
 
</pre>
 +
 +
*[[pfctl Konsole]]
 +
 +
 +
=Links=
 +
*https://www.digitalocean.com/community/tutorials/how-to-configure-packet-filter-pf-on-freebsd-12-1-de
 +
*https://www.openbsdhandbook.com/pf/cheat_sheet/
 +
*https://www.freebsd.org/doc/de_DE.ISO8859-1/books/handbook/firewalls-pf.html
 +
*http://srobb.net/pf.html
 +
*http://serverzeit.de/tutorials/firewall
 +
*https://www.heise.de/ct/artikel/Das-Firewall-Tool-pf-in-Mac-OS-X-10-7-Lion-1348566.html

Aktuelle Version vom 13. Februar 2022, 09:14 Uhr

start manual

  • kldload pf
  • pfctl -e

start auto

  • echo 'pf_load="YES"' >> /boot/loader.conf

/etc/rc.conf

gateway_enable="YES"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pflog_logfile="/var/log/pflog"

/etc/pf.conf

####################
#      MACROS      #
####################
wandev=re0
landev=re1
#IP_EXT="{ 192.168.1.1 }"
lan="{ 10.83.39.0/24 }"
#tcp_services="{ 22, 443 }"

####################
#      TABLES      #
####################

####################
#     OPTIONS      #
####################

####################
#     TRAFFIC      #
####################

####################
#     QUEUEING     #
####################

####################
#   TRANSLATION    #
####################
nat on $wandev from $lan to any -> ($wandev)
#rdr on $INET inet proto tcp to port 22 -> 192.168.2.2 22

####################
# PACKET FILTERING #
####################
pass in all


Links