Page 1 of 1
GRE tunnel can't connect
Posted: 7. Apr 2013, 16:25
by gulamerah
hi everyone,
i've been trying to create gre tunnel for days, but it won't connect.
i'm using virtual box 4.2.10 , ubuntu server 12.04 on windows 7 host.
the network interfaces for each VBOX are same. eth0 uses NAT interfaces and eth1 uses bridged networking with "allow all" option enabled
in /etc/network/interfaces VBOX A eth1 - ip address 10.10.10.1
in /etc/network/interfaces VBOX B eth1 - ip address 20.20.20.1
so, i'm trying to create a tunnel between that network using this setting :
VBOX A
---------
sudo modprobe ip_gre
sudo iptunnel add gre1 mode gre remote 20.20.20.1 local 10.10.10.1 ttl 225
ifconfig gre1 1.1.1.1/24
ifconfig gre1 up
ifconfig gre1 pointopoint 1.1.1.2
ifconfig gre1 multicast
VBOX B
---------
sudo modprobe ip_gre
sudo iptunnel add gre1 mode gre remote 10.10.10.1 local 20.20.20.1 ttl 225
ifconfig gre1 1.1.1.2/24
ifconfig gre1 up
ifconfig gre1 pointopoint 1.1.1.1
ifconfig gre1 multicast
in each VBOX , ifconfig shows the tunnels are up. i can ping the tunnel interface in it's box. but i can't reach the other side of the tunnel.
i think it's a simple configuration. but i'm stuck in it. i've tinkering for days but cannnot figure out what's wrong with the configuration....
i'll be so grateful if anyone can help
Re: GRE tunnel can't connect
Posted: 7. Apr 2013, 17:18
by Perryg
Re: GRE tunnel can't connect
Posted: 7. Apr 2013, 18:28
by gulamerah
thanks for your fast reply.
from the doc, it said that there's a possibilty to setup a tunnel if i'm not mistaken.
do you know what to setup to enable the tunneling? should i change the adapter to "host-only"??
actually my goal is to virtualize a DMVPN network using virtual box, so i'll have to setup ipsec later.
Re: GRE tunnel can't connect
Posted: 7. Apr 2013, 18:38
by Perryg
You only need to *not use VBox NAT. It does not support the protocols needed.
Re: GRE tunnel can't connect
Posted: 7. Apr 2013, 19:00
by gulamerah
i use 2 interface in my VBOX .
first eth0 (NAT) so i can connect to internet.
second eth1 (bridged networking) which i connect the tunnel.
i've set a static ip in the linux guest /etc/network/interfaces .
my question is, how is the right configuration for gre tunnel ? i've tried the configuration mentioned above, and other configuration but none of the succedd.
the tunnel can be created, but cannot reach other tunnel
it's so confusing. some of other configuration i saw on the net look no different and i've tried the without good result

Re: GRE tunnel can't connect
Posted: 8. Apr 2013, 09:47
by noteirak
This is a networking problem, which is quite outside of the scope of this forum.
i will still give you this : you are using 10.xxxx and 20.xxxx, what about the subnets? What about the routing? Vbox NAT is also in 10.xxxx, so is it not conflicting?
GRE tunneling is advanced networking topic, so the best place would a networking forum.
Re: GRE tunnel can't connect
Posted: 8. Apr 2013, 15:36
by gulamerah
noteirak wrote:This is a networking problem, which is quite outside of the scope of this forum.
i will still give you this : you are using 10.xxxx and 20.xxxx, what about the subnets? What about the routing? Vbox NAT is also in 10.xxxx, so is it not conflicting?
GRE tunneling is advanced networking topic, so the best place would a networking forum.
thanks for your advice . you are right, it's pretty confusing, beside i'm new to linux and vbox..
about the ip address range, i have tried different address too but the tunnel is still not workng.
the address fof VBOX A : 172.168.1.1/24 and VBOX B 172.168.2.1/24
i've read and googling these days and found the settings are simple but i don't know what's wrong with my own setting .
i just follow the tutorial, but still no result .
noteirak wrote:
i will still give you this : you are using 10.xxxx and 20.xxxx, what about the subnets? What about the routing? Vbox NAT is also in 10.xxxx, so is it not conflicting?
i think if i can achieve GRE the routing would be easier
Re: GRE tunnel can't connect
Posted: 8. Apr 2013, 15:59
by Martin
Did you try a private IP address range for the tunnel? 1.1.1.x is reserved somewhere in the Internet

Re: GRE tunnel can't connect
Posted: 8. Apr 2013, 18:15
by gulamerah
Martin wrote:Did you try a private IP address range for the tunnel? 1.1.1.x is reserved somewhere in the Internet

yes, but it is a private nework. so it will not connect to internet. and i have tried other ip address, reinstalling VBOX and the result is just same.
Re: GRE tunnel can't connect
Posted: 9. Apr 2013, 10:28
by noteirak
gulamerah wrote:the address fof VBOX A : 172.168.1.1/24 and VBOX B 172.168.2.1/24
These are two different subnets, you must have a router in between them, or it will not work, first of all.
You seem to lack quite a lot of network understanding, which is not an issue itself, but is definitly one for what you are trying to achieve.
Either stick to the letter of your tutorial, or get some network understanding first.
Re: GRE tunnel can't connect
Posted: 9. Apr 2013, 20:24
by gulamerah
noteirak wrote:gulamerah wrote:the address fof VBOX A : 172.168.1.1/24 and VBOX B 172.168.2.1/24
These are two different subnets, you must have a router in between them, or it will not work, first of all.
You seem to lack quite a lot of network understanding, which is not an issue itself, but is definitly one for what you are trying to achieve.
Either stick to the letter of your tutorial, or get some network understanding first.
noteirak thanks so much for giving me a hint, the tunnel is a success now.
after i try it again , the problem is "gateway". i haven't set gateway for the outgoing interface, that's eth1.
so, this is my working settings :
VBOX A ip address : 172.168.1.1/24 and for tunnel 10.0.201.1/24
VBOX B ip address : 172.168.2.1/24 and for tunnel 10.0.201.2/24
and i'll continue to try ipsec to achieve my goal : dmvpn
thanks everyone.