User Tools

Site Tools


hardware:gretunnel

This is an old revision of the document!


On the gateway machine with IP 192.169.2.81

Stop firewalld or ufw

ufw disable
  ip tunnel add gre1 mode gre remote 192.168.2.99 local 192.168.2.81 ttl 255
  ip link set gre1 up
  ip addr add 10.200.200.201/30 dev gre1

Confirm the route is present

ip route

10.200.200.200/30 dev gre1 proto kernel scope link src 10.10.10.99 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
192.168.2.0/24 dev enp2s0 proto kernel scope link src 192.168.2.99 

Use IPTables to NAT to the remote GRE

iptables -t nat -A PREROUTING -p udp --dport 5111 -j DNAT --to-destination 10.200.200.202:5111

On the Trisul probe machine with real IP 192.168.2.99

  ip tunnel add gre1 mode gre remote 192.168.2.81  local 192.168.2.99  ttl 255
  ip link set gre1 up
  ip addr add  10.200.200.202/30  dev gre1

Credits

Creating a GRE tunnel http://ask.xmodulo.com/create-gre-tunnel-linux.html

hardware/gretunnel.1546693796.txt.gz · Last modified: 2019/01/05 18:39 by veera