Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.4 KiB

  1. # $OpenBSD: bgpd.conf,v 1.15 2013/08/14 21:25:43 claudio Exp $
  2. # sample bgpd configuration file
  3. # see bgpd.conf(5)
  4. #macros
  5. peer1="10.1.0.2"
  6. peer2="10.1.0.3"
  7. # global configuration
  8. AS 65001
  9. router-id 10.0.0.1
  10. # holdtime 180
  11. # holdtime min 3
  12. # listen on 127.0.0.1
  13. # listen on ::1
  14. # fib-update no
  15. # route-collector no
  16. # log updates
  17. # network 10.0.1.0/24
  18. # restricted socket for bgplg(8)
  19. # socket "/var/www/run/bgpd.rsock" restricted
  20. # neighbors and peers
  21. group "peering AS65002" {
  22. remote-as 65002
  23. neighbor $peer1 {
  24. descr "AS 65001 peer 1"
  25. announce self
  26. tcp md5sig password mekmitasdigoat
  27. }
  28. neighbor $peer2 {
  29. descr "AS 65001 peer 2"
  30. announce all
  31. local-address 10.0.0.8
  32. ipsec esp ike
  33. }
  34. }
  35. group "peering AS65042" {
  36. descr "peering AS 65042"
  37. local-address 10.0.0.8
  38. ipsec ah ike
  39. neighbor 10.2.0.1
  40. neighbor 10.2.0.2
  41. }
  42. neighbor 10.0.1.0 {
  43. remote-as 65003
  44. descr upstream
  45. multihop 2
  46. local-address 10.0.0.8
  47. passive
  48. holdtime 180
  49. holdtime min 3
  50. announce none
  51. tcp md5sig key deadbeef
  52. }
  53. neighbor 10.0.2.0 {
  54. remote-as 65004
  55. descr upstream2
  56. local-address 10.0.0.8
  57. ipsec ah ike
  58. }
  59. neighbor 10.0.0.0/24 {
  60. descr "template for local peers"
  61. }
  62. neighbor 10.2.1.1 {
  63. remote-as 65023
  64. local-address 10.0.0.8
  65. ipsec esp in spi 10 sha1 0a4f1d1f1a1c4f3c9e2f6f0f2a8e9c8c5a1b0b3b \
  66. aes 0c1b3a6c7d7a8d2e0e7b4f3d5e8e6c1e
  67. ipsec esp out spi 12 sha1 0e9c8f6a8e2c7d3a0b5d0d0f0a3c5c1d2b8e0f8b \
  68. aes 4e0f2f1b5c4e3c0d0e2f2d3b8c5c8f0b
  69. }
  70. # filter out prefixes longer than 24 or shorter than 8 bits for IPv4
  71. # and longer than 48 or shorter than 16 bits for IPv6.
  72. deny from any
  73. allow from any inet prefixlen 8 - 24
  74. allow from any inet6 prefixlen 16 - 48
  75. # accept a default route (since the previous rule blocks this)
  76. #allow from any prefix 0.0.0.0/0
  77. # filter bogus networks according to RFC5735
  78. deny from any prefix 0.0.0.0/8 prefixlen >= 8 # 'this' network [RFC1122]
  79. deny from any prefix 10.0.0.0/8 prefixlen >= 8 # private space [RFC1918]
  80. deny from any prefix 100.64.0.0/10 prefixlen >= 10 # CGN Shared [RFC6598]
  81. deny from any prefix 127.0.0.0/8 prefixlen >= 8 # localhost [RFC1122]
  82. deny from any prefix 169.254.0.0/16 prefixlen >= 16 # link local [RFC3927]
  83. deny from any prefix 172.16.0.0/12 prefixlen >= 12 # private space [RFC1918]
  84. deny from any prefix 192.0.2.0/24 prefixlen >= 24 # TEST-NET-1 [RFC5737]
  85. deny from any prefix 192.168.0.0/16 prefixlen >= 16 # private space [RFC1918]
  86. deny from any prefix 198.18.0.0/15 prefixlen >= 15 # benchmarking [RFC2544]
  87. deny from any prefix 198.51.100.0/24 prefixlen >= 24 # TEST-NET-2 [RFC5737]
  88. deny from any prefix 203.0.113.0/24 prefixlen >= 24 # TEST-NET-3 [RFC5737]
  89. deny from any prefix 224.0.0.0/4 prefixlen >= 4 # multicast
  90. deny from any prefix 240.0.0.0/4 prefixlen >= 4 # reserved
  91. # filter bogus IPv6 networks according to IANA
  92. deny from any prefix ::/8 prefixlen >= 8
  93. deny from any prefix 0100::/64 prefixlen >= 64 # Discard-Only [RFC6666]
  94. deny from any prefix 2001:2::/48 prefixlen >= 48 # BMWG [RFC5180]
  95. deny from any prefix 2001:10::/28 prefixlen >= 28 # ORCHID [RFC4843]
  96. deny from any prefix 2001:db8::/32 prefixlen >= 32 # docu range [RFC3849]
  97. deny from any prefix 3ffe::/16 prefixlen >= 16 # old 6bone
  98. deny from any prefix fc00::/7 prefixlen >= 7 # unique local unicast
  99. deny from any prefix fe80::/10 prefixlen >= 10 # link local unicast
  100. deny from any prefix fec0::/10 prefixlen >= 10 # old site local unicast
  101. deny from any prefix ff00::/8 prefixlen >= 8 # multicast