User Tools

Site Tools


gre_tunnel

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gre_tunnel [2015/12/13 14:48]
Francisco Dias [Forwarding Ports Over your GRE Tunnel]
gre_tunnel [2016/06/02 00:46] (current)
Francisco Dias
Line 51: Line 51:
 echo '​net.ipv4.ip_forward=1'​ >> /​etc/​sysctl.conf echo '​net.ipv4.ip_forward=1'​ >> /​etc/​sysctl.conf
 sysctl -p sysctl -p
-iptunnel add gre1 mode gre local YOUR_FILTERED_IP ​remote DESTINATION_SERVER_IP ttl 255+iptunnel add gre1 mode gre local YOUR_UNFILTERED_IP ​remote DESTINATION_SERVER_IP ttl 255
 ip addr add 192.168.168.1/​30 dev gre1 ip addr add 192.168.168.1/​30 dev gre1
 ip link set gre1 up ip link set gre1 up
Line 59: Line 59:
  
 <​code>​ <​code>​
-iptunnel add gre1 mode gre local DESTINATION_SERVER_IP remote ​YOUR_FILTERED_IP ​ttl 255+iptunnel add gre1 mode gre local DESTINATION_SERVER_IP remote ​YOUR_UNFILTERED_IP ​ttl 255
 ip addr add 192.168.168.2/​30 dev gre1 ip addr add 192.168.168.2/​30 dev gre1
 ip link set gre1 up ip link set gre1 up
 </​code>​ </​code>​
 +
 +You will always want to form your GRE with your **unfiltered** IP address for all GRE tunnels to make sure you don't run into any sort of MTU issues or trigger the DDOS protection.
  
 Please note the first line of each changes to mark what IP to use locally and which remotely. The 2nd line documents each end point. In a /30, 2 IP's are usable: .1 and .2. Please note the first line of each changes to mark what IP to use locally and which remotely. The 2nd line documents each end point. In a /30, 2 IP's are usable: .1 and .2.
gre_tunnel.txt · Last modified: 2016/06/02 00:46 by Francisco Dias