IP GRE
From Whats notepad
Contents |
[edit] INTRODUCCIÓ
Protocol dels tunnels cisco ?
[edit] CREAR UN TUNNEL ENTRE DOS LINUX
[edit] EN UNA MÀQUINA
/sbin/modprobe ip_gre /sbin/ip tunnel add tunel0 mode gre remote 213.34.153.24 /sbin/ifconfig tunel0 10.20.0.1 pointopoint 10.20.0.2 mtu 1512 /sbin/route add -net 192.168.25.0 netmask 255.255.252.0 gw 10.20.0.2 dev tunel0
[edit] EN L'ALTRE MÀQUINA
/sbin/modprobe ip_gre /sbin/ip tunnel add tunel0 mode gre remote 234.242.23.84 /sbin/ifconfig tunel0 10.20.0.2 pointopoint 10.20.0.1 mtu 1512 /sbin/route add -net 192.168.100.0/24 gw 10.20.0.1 dev tunel0
Per a que això funcioni, el router ha d'enrutar o deixar passar el protocol GRE (47) i al nostre firewall hauriem d'executar
iptables -A INPUT -p 47 -j ACCEPT iptables -A OUTPUT -p 47 -j ACCEPT
Per eliminar el tunnel
/sbin/ifconfig tunel0 down /sbin/ip tunnel del tunel0
