![]() |
|
OpenBSD Security Functionally paranoid! |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
Greetings all,
I am trying to replace my pre-stoneage router with one based on OpenBSD. I have the basics working, i.e., pf, unbound, dhcp, but have two problems. 1. Regardless of the correct line in the file /etc/sysconf.conf Code:
# $OpenBSD: syslog.conf,v 1.21 2021/10/13 20:34:03 sthen Exp $ # *.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none /var/log/messages kern.debug;syslog,user.info /var/log/messages auth.info /var/log/authlog authpriv.debug /var/log/secure cron.info /var/cron/log daemon.info /var/log/daemon ftp.info /var/log/xferlog lpr.debug /var/log/lpd-errs mail.info /var/log/maillog # Uncomment this line to send "important" messages to the system # console: be aware that this could create lots of output. #*.err;auth.notice;authpriv.none;kern.debug;mail.crit /dev/console # Uncomment this to have all messages of notice level and higher # as well as all authentication messages sent to root. #*.notice;auth.debug root # Everyone gets emergency messages. #*.emerg * # Uncomment to log to a central host named "loghost" using syslog-tls. # You need to run syslogd with the -S option on the remote host if you # are using this. #*.notice;auth,authpriv,cron,ftp,kern,lpr,mail,user.none @tls://loghost #auth,daemon,syslog,user.info;authpriv,kern.debug @tls://loghost # Uncomment to log messages from doas(1) to its own log file. Matches are done # based on the program name. # Program-specific logs: #!doas #*.* /var/log/doas # Enable forwarding between machine ports net.inet.ip.forwarding=1 Code:
starting early daemons: sysLogdDec "date" firewall syslogd[8305]: unknown priority name "inet.ip.forwarding=1" Any help wold be greatly appreciated. Kindest regards, M |
|
|||
![]()
jggimi for the win.
Thank you very much for spotting my idiocy regarding the /etc/sys*.conf. Regarding the /etc/pf.conf, although my testing suggest that the rules are doing what I intended, I still struggle with some of the concepts. For example, this is an excerpt from my "General traffic rules", that are applied before the rules for the VLANs. Code:
#---------------------------------# # Default traffic rules #---------------------------------# # Spoofing protection for all NICs. block in quick from no-route block in quick from urpf-failed # Block non-routable private addresses. block in quick on $ext_if from <martians> to any block return out quick on $ext_if from any to <martians> # By default, do not permit remote connections to X11 block return in on ! lo0 proto tcp to port 6000:6010 # Port build user does not need network block return out log proto {tcp udp} user _pbuild # Default blocking all traffic in on all LAN NICs from any computer or device block return in on { $vlan_1 } # Default blocking and logging all traffic in on the external NIC from the Internet/ISP, block drop in log on $ext_if # Block DNS over HTTPS block in quick on { $vlan_1 } to <block_doh> # Allow ICMP. match in on $ext_if inet proto icmp icmp-type $icmp_types tag ICMP_IN block drop in on $ext_if proto icmp pass in proto icmp tagged ICMP_IN max-pkt-rate 100/10 # Allow traceroute pass out on $ext_if inet proto udp to port 33433 >< 33626 # Allow SSH # pass in on $ext_if inet proto tcp to ($ext_if) port 22 # Allow traffic from LAN via the external NIC to the Internet. pass out inet from $ext_if Code:
block in all The only dubious(?) explanation I was able to find was that it is better to be paranoid and explicitly block all the potentially harmful traffic. Although it appeals to my paranoid mind, it seems that Code:
block in all But, even Mr. Hansen lists those more detailed rules, so I must be still overlooking something. Kindest regards, M |
|
||||
![]()
You can provision PF many different ways. For my servers, I usually start with a "default block" rule and then explicitly state what traffic I allow to pass. For my workstations, I usually use a "default pass" rule set, and there may not be any block rules at all.
My personal PF guidelines:
|
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hardware for embedded FreeBSD/OpenBSD custom router/firewall ( Ent. firewall, ADSL ro | Bsaidus | General Hardware | 5 | 24th November 2023 09:57 PM |
Smallest, cheapest hardware for OpenBSD router + firewall | beiroot | OpenBSD General | 22 | 12th April 2018 09:37 AM |
MacVTap VEPA with OpenBSD router/firewall, need bridge to reflect on same segment | rbigm101 | OpenBSD Security | 17 | 20th September 2016 04:03 PM |
OpenBSD 5.7 Router Issues | Peter_APIIT | OpenBSD General | 8 | 18th June 2015 06:31 AM |
OpenBSD amd64 or i386 for firewall/router | J65nko | OpenBSD General | 7 | 24th December 2009 09:06 PM |