Created
June 5, 2020 11:50
-
-
Save ahmetozer/113cd553a5ca815ecccbc80e882b5d0f to your computer and use it in GitHub Desktop.
Linux ifupdown 6to4 configuration
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
| #You can get 6to4 adress with below command | |
| #printf "2002:%02x%02x:%02x%02x::1" `curl https://ahmetozer.org/cdn-cgi/tracert -4 -s |grep ip | cut -d"=" -f 2 | tr "." " "` | |
| auto 6to4 | |
| iface 6to4 inet6 v4tunnel | |
| address 2002:0808:0808::1 #Do not forget to change own ip in all config. | |
| netmask 48 # | |
| endpoint 192.88.99.1 # Anycast Tunnel Gateway | |
| #gateway 2002:0808:0808:: | |
| ttl 255 | |
| # If you have a Native or other IPv6 acces on system You can add ip table to easliy manage | |
| post-up ip -6 rule add to 2002:0808:0808::1/48 table 6to4 | |
| post-up ip -6 rule add from 2002:0808:0808::1/48 table 6to4 | |
| post-up ip -6 ro re default dev 6to4 table ams4-6 | |
| # If you want to use in other namespaces like a docker or vpn, you have to add route rule to table. | |
| post-up ip -6 ro re 2002:0808:0808:5::/64 dev dockerInterface table 6to4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment