Last active
May 3, 2025 03:36
-
-
Save project0/24152181bf2a3d8f864b2feb1072f096 to your computer and use it in GitHub Desktop.
Systemd networkd TunnelBroker Hurricane Electric 6in4
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
# This can be any public reachable interface | |
# basically the one connected to the internet (native or bridged) | |
[Match] | |
Name=eth1 | |
[Network] | |
# your normal interface address example: 10.1.1.2/24 | |
Address=<LOCAL_IPV4>/<NETMASK> | |
Gateway=<LOCAL_IPV4_GW> # local ip gw e.g 10.1.1.1 | |
# below is tunnel specific | |
Tunnel=he6 | |
# One of the tunnel routed ipv6 address (e.g. 2001:470:xxx::1/64 or /48) | |
Address=<ROUTED_IPV6_ADDRESS> |
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
# Define and create tunnel interface | |
[Match] | |
[NetDev] | |
Name=he6 | |
Kind=sit | |
MTUBytes=1480 | |
[Tunnel] | |
Remote=<SERVER_IPV4_ADDRESS> | |
Local=<LOCAL_IPV4> | |
TTL=255 |
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
# This is your tunnel network configuration | |
[Match] | |
Name=he6 | |
[Network] | |
Address=<CLIENT_IPV6_ADDRESS> | |
Gateway=<SERVER_IPV6_ADDRESS> | |
# optional ip forward | |
IPForward=yes | |
# Policy based routes below are only required if you have existing ipv6 setup | |
# and want to ensure incoming routing works properly | |
[Route] | |
Gateway=<SERVER_IPV6_ADDRESS> | |
Destination=::/0 | |
Table=200 | |
Metric=20 | |
[RoutingPolicyRule] | |
Table=200 | |
Family=ipv6 | |
From=<CLIENT_IPV6_ADDRESS> | |
[RoutingPolicyRule] | |
Table=200 | |
Family=ipv6 | |
From=<ROUTED_IPV6_PREFIX> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment