Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Routing between networks


    I have the following setup on my Ubuntu box:

    Code:
    wan0:
    192.168.10.20/24
    
    lan0:
    172.16.2.1/23
    
    eth0:
    172.16.4.1/23
    From network: 172.16.2.1, I can ping 172.16.4.1 (The gateway), but no other hosts on that network. And from network 172.16.4.1 I can ping back to 172.16.2.1, but no other hosts on that network. I can ping any host on any of these networks from the actual Ubuntu box (Which is also serving DHCP etc).

    wan0 is Masqueraded.

    Here is my route -n output:
    Code:
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    0.0.0.0         192.168.10.1    0.0.0.0         UG    100    0        0 wan0
    172.16.2.0      0.0.0.0         255.255.254.0   U     0      0        0 lan0
    172.16.4.0      0.0.0.0         255.255.254.0   U     0      0        0 eth0
    192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 wan0
    Can someone please explain why my 2 networks can't talk to each other?

    This has been annoying me for days.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,727
    Do you have FORWARD turned on?

    echo 1 > /proc/sys/net/ipv4/ip_forward

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Quote Originally Posted by Lazydog View Post
    Do you have FORWARD turned on?
    Yep. It reports 1. Masquerading wouldn't work if this was 0 though right (I had to turn it before before it would work)?

  4. $spacer_open
    $spacer_close
  5. #4
    Never mind. I can't believe after all this time it was an IPTables issue. I had INPUT -j ACCEPT, but not FORWARD -j ACCEPT for said adapters -_-;;

    Thank you for your help Lazdog!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •