Created
May 17, 2024 05:18
-
-
Save real-jiakai/37f5255fa7da0f8e77b3cfccd9f76f60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bird 2 configuration file for 你的ASN号 | |
# Log to syslog | |
log syslog all; | |
# Set router ID to the IP address of my VPS | |
router id 你的vps的ipv4地址; | |
# Device protocol | |
protocol device { | |
scan time 10; | |
} | |
# Kernel protocol for IPv6 | |
protocol kernel { | |
ipv6 { | |
import all; | |
export all; | |
}; | |
} | |
# Direct protocol | |
protocol direct { | |
ipv6; | |
} | |
# Static route protocol for IPv6 | |
protocol static static6_bgp { | |
ipv6; | |
route 分配给你ASN的vps ipv6地址段 via 该地址段段第一个地址; # Adjust the route to reflect your subnet | |
} | |
# BGP export filter for IPv6 | |
filter c1v_bgp6_out { | |
if net ~ [分配给你ASN的vps ipv6地址段] then accept; # Ensure you're only announcing your prefix | |
reject; | |
} | |
# BGP protocol configuration | |
protocol bgp bgp6_c1v { | |
local as 你的ASN号; # Your ASN | |
neighbor 上游的ipv6地址 as 上游的ASN号; # Your upstream's IPv6 address and ASN | |
ipv6 { | |
import none; | |
export filter c1v_bgp6_out; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment