Advertisement
ptkrisada

Network crashes NetBSD 10_RC6 (probably ISP issue)

Mar 12th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. ########################
  2. # part of /etc/rc.conf #
  3. ########################
  4.  
  5. ip6mode="host"
  6. #ifconfig_wm0 static addresses for IPv4 and IPv6 are set in /etc/ifconfig.wm0
  7. defaultroute="192.168.1.1"
  8. defaultroute6="fe80::1%wm0"
  9. ...
  10. npf=YES
  11. npf_rules="/etc/npf.conf"
  12.  
  13. #############################
  14. # part of /etc/ifconfig.wm0 #
  15. #############################
  16.  
  17. inet 192.168.1.20 netmask 0xffffff00
  18. inet6 2001:fb1:138:760f:2cc7:1066:153f:e957 prefixlen 64
  19. up
  20.  
  21. ############################
  22. # part of my /etc/npf.conf #
  23. ############################
  24.  
  25. # /etc/npf.conf
  26. $ext_if4 = inet4(wm0)
  27. $ext_if6 = inet6(wm0)
  28.  
  29. $services = { ftp, ssh, http }
  30.  
  31. procedure "log" {
  32. log: npflog0
  33. }
  34.  
  35. procedure "norm" {
  36. normalize: "random-id" #, "min-ttl" 512, "max-mss" 1432
  37. }
  38.  
  39. group "external" on $ext_if4 {
  40. pass in final proto tcp to $ext_if4 port $services apply "log"
  41. pass in final proto tcp to $ext_if4 port 1024-65535 # Passive FTP
  42. pass in final proto udp to $ext_if4 port 33434-33600 # Traceroute
  43. pass final on $ext_if4 family inet4 proto icmp all # Ping
  44. pass stateful out final family inet4 proto tcp flags S/SA from $ext_if4 apply "norm"
  45. pass out final family inet4 proto tcp from $ext_if4 apply "norm"
  46. pass stateful out final family inet4 from $ext_if4 apply "norm"
  47. }
  48.  
  49. group "external6" on $ext_if6 {
  50. pass in final proto tcp to $ext_if6 port $services apply "log"
  51. pass in final proto tcp to $ext_if6 port 1024-65535 # Passive FTP
  52. pass in final proto udp to $ext_if6 port 33434-33600 # Traceroute
  53. pass final on $ext_if6 family inet6 proto ipv6-icmp all # Ping
  54. pass stateful out final family inet6 proto tcp flags S/SA from $ext_if6 apply "norm"
  55. pass out final family inet6 proto tcp from $ext_if6 apply "norm"
  56. pass stateful out final family inet6 from $ext_if6 apply "norm"
  57. }
  58.  
  59. group default {
  60. pass final on lo0 all
  61. block all apply "log"
  62. }
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement