Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a two networks that I need to link in two directions.

  • network A 10.11.0.0/24 - and its gateway 10.11.0.1
  • network B 10.0.0.0/24

network B has a VPN server (10.0.0.38) that is doing a masquerade already, so network A can ping network B.

But the vice-versa isn't true, I can't make network B machines ping or see network A.

I tried to add this to a network B machine without a result:

route add  -net 10.11.0.0 netmask 255.255.255.0 gw 10.0.0.38

How can I make network B see network A?

Edit#1 : OpenVPN, TUN mode. I need to add routing on network A so it use the VPN server as its gateway to network B.

share|improve this question
    
What VPN server? What mode is it set to? –  Journeyman Geek Jan 16 at 1:08
    
What you really need is a router between a and b. Or turn off the masquerading and use route statements on both sides. –  Ron Jan 16 at 17:08
    
Ron : Can you please give example of route statments ?? Thanks –  user2067735 Jan 16 at 18:48
    
Hi, I made a small draw because I think I misunderstand your problem. But as I understand it correctly (expect the VPN server thing) you should add the GW to the other interface too. What does it print out after invoking route add -net 10.11.0.0 netmask 255.255.255.0 gw 10.0.0.38 ? –  csikos.balint Jan 16 at 19:56
    
@csikos.balint Thanks for being interested, it prints nothing (no error message, and the routing becomes listed when I list the routes –  user2067735 Jan 17 at 11:11

1 Answer 1

Solved.

I just needed to make the command like this (adding the interface at the end) :

    route add  -net 10.11.0.0 netmask 255.255.255.0 gw 10.0.0.38 eth0
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.