Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two private networks (A, B) that connects via another company's private network (C). Network A has internet access. I want to make a tunnel between B and A that goes through C. Then network B will use A as default route for internet access.

Network A: 10.20.0.0/24, on C: 10.10.15.3
Network B: 10.20.1.0/24, on C: 192.168.25.3

10.10.15.3 can access 192.168.25.3 and vice versa

Network A tunnel script:

ip tunnel add tunnel0 mode gre local 10.10.15.3 remote 192.168.25.3 ttl 64
ip link set tunnel0 up
ip addr add 10.20.200.1/30 peer 10.20.200.2/30 dev tunnel0
ip route add 10.20.1.0/24 via 10.20.200.2

Network B tunnel:

ip tunnel add tunnel0 mode gre local 192.168.25.3 remote 10.10.15.3 ttl 64
ip link set tunnel0 up
ip addr add 10.20.200.2/30 peer 10.20.200.1/30 dev tunnel0
ip route add 10.20.0.0/24 via 10.20.200.1
ip r d default && ip r a default via 10.20.200.1

From GW on network B:

traceroute to 10.20.0.1 (10.20.0.1), 30 hops max, 38 byte packets
1 10.20.0.1 (10.20.0.1) 4.685 ms 4.505 ms 4.478 ms

traceroute to 10.20.0.14 (10.20.0.14), 30 hops max, 38 byte packets
1 10.20.200.1 (10.20.200.1) 4.643 ms 4.387 ms 4.555 ms
2 10.20.200.1 (10.20.200.1) 4.423 ms 4.473 ms 4.437 ms

traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
1 10.20.200.1 (10.20.200.1) 4.595 ms 4.461 ms 4.628 ms
2 10.20.200.1 (10.20.200.1) 4.476 ms 4.521 ms 4.536 ms

something's not right.... but why?

share|improve this question
    
You cannot allow a tunnel to become the route to its own destination or the tunnel implodes. –  David Schwartz Mar 7 '12 at 17:21
    
No, but I can set the default route via the tunnel since 10.10.15.3 and 192.168.25.3 talks directly to each other via the bridge. –  Sirber Mar 13 '12 at 18:21

1 Answer 1

up vote 0 down vote accepted

lol

I forgot to accept FORWARD by default on 10.10.15.3 :(

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.