Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save khadishi/b5fbcb27f475f0ad42a342d8dc7433f6 to your computer and use it in GitHub Desktop.
Save khadishi/b5fbcb27f475f0ad42a342d8dc7433f6 to your computer and use it in GitHub Desktop.
6to4 Centos Tunnel
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