Forked from soheilsec/gist:a7597c1d127dd278a46d391664e65505
Last active
September 8, 2024 00:18
-
-
Save khadishi/b5fbcb27f475f0ad42a342d8dc7433f6 to your computer and use it in GitHub Desktop.
6to4 Centos Tunnel
This file contains 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
fc00::1/8 | |
fc00::2/8 | |
2001:4860:4860::8888 | |
2001:4860:4860::8844 | |
#IRAN | |
iptables -A INPUT -p icmpv6 -j ACCEPT | |
iptables -A FORWARD -p icmpv6 -j ACCEPT | |
iptables -I INPUT -p gre -j ACCEPT | |
iptables -I FORWARD -p gre -j ACCEPT | |
ip tunnel add 6to4tun_IR mode sit remote KHIP local INPUTIP | |
ip -6 addr add fc00::1/8 dev 6to4tun_IR | |
ip link set 6to4tun_IR mtu 1480 | |
ip link set 6to4tun_IR up | |
# confige tunnele GRE6 ya IPIPv6 IR | |
ip -6 tunnel add GRE6Tun_IR mode ip6gre remote fc00::2 local fc00::1 | |
ip addr add 172.16.1.1/30 dev GRE6Tun_IR | |
ip link set GRE6Tun_IR mtu 1436 | |
ip link set GRE6Tun_IR up | |
#kharej | |
# confige tunnele 6to4 KH | |
iptables -A INPUT -p icmpv6 -j ACCEPT | |
iptables -A FORWARD -p icmpv6 -j ACCEPT | |
iptables -I INPUT -p gre -j ACCEPT | |
iptables -I FORWARD -p gre -j ACCEPT | |
ip tunnel add 6to4tun_KH mode sit remote IRANIP local KHIP | |
ip -6 addr add fc00::2/8 dev 6to4tun_KH | |
ip link set 6to4tun_KH mtu 1480 | |
ip link set 6to4tun_KH up | |
# confige tunnele GRE6 KH using 6to4 | |
ip -6 tunnel add GRE6Tun_KH mode ip6gre remote fc00::1 local fc00::2 | |
ip addr add 172.16.1.2/30 dev GRE6Tun_KH | |
ip link set GRE6Tun_KH mtu 1436 | |
ip link set GRE6Tun_KH up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment