Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I have a linux machine which is connected to the other linux machine through ethernet over usb. Both the linux machines are running ubuntu. The second linux machine is ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Need help with ip forwarding


    Hello,

    I have a linux machine which is connected to the other linux machine through ethernet over usb. Both the linux machines are running ubuntu. The second linux machine is connected to wifi router and wifi router is connected to windows systems over wifi. Lemme just put it like this,

    linux machine 1<---usb--->linux machine 2<---wifi-->router<---wifi--->windows

    linux machine 1 usb0 : 172.20.1.103
    linux machine 2 usb0 : 172.20.1.1
    linux machine 2 wlan0 : 192.168.2.2
    wifi router : 192.168.2.1
    windows system : 192.168.2.91


    Now, i want to ping windows from linux machine 1.
    i am able to ping wlan interface of linux machine 2 as well but after that i am not able to ping router nor windows.

    1. i made echo 1 > /etc/sys/net/ipv4/ip_forward
    2. I even tried all sort of iptables rules.


    Any help would be appreciated.

    Thanks,
    Bhavin

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    IP addresses and routing tables for all devices would be nice to see where the problem might be.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3
    Hi,

    Following the route table on linux machine 1,

    bhavin@ubuntu_machine1:~$ route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    * 172.20.1.1 255.255.255.255 UH 0 0 0 usb0
    default * 0.0.0.0 U 0 0 0 usb0


    following is the route table on linux machine 2,

    bhavin@ubuntu_machine2:~$ route
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.2.0 * 255.255.255.0 UH 0 0 0 tiwlan0
    172.20.1.0 * 255.255.255.0 U 0 0 0 usb0

  4. #4
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3
    Anyone can help me out plz. I am kind of stuck with this issue.

  5. #5
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    what does traceroute show from host 1 to the windows server?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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