Find the answer to your Linux question:
Results 1 to 6 of 6
I want to build network that consist of 3 PC's, 1 client & 1 server & 1 intermediate. Client connect with intermediate wirelessly while server connect with intermediate is wired. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2013
    Posts
    3

    connect wireless & wired network


    I want to build network that consist of 3 PC's, 1 client & 1 server & 1 intermediate. Client connect with intermediate wirelessly while server connect with intermediate is wired. So intermediate has wired and wireless card. When I used PING the client for server I get message error "unreachable destination". I used different network for wired and wireless, for wired I used 192.168.1.0 while for wireless I used 192.168.2.0.
    Notice that I use UBUNTU 13.04. Can someone help me to solve this problem?

  2. #2
    Just Joined! krokoziabla's Avatar
    Join Date
    Sep 2012
    Location
    Russia
    Posts
    20
    I think you need to enable IP forwarding on your intermediate host. Please, check net.ipv4.conf.<your interface name>.forwarding system variable for both the wired and wireless interfaces. It can be done by sysctl tool. The variables should be set to 1. If it is not enough check net.ipv4.ip_forward variable the same way. It should be sufficient to make your intermediate host work as a router. And don't forget to check iptables's FORWARD chain. iptables is the linux's network stack firewall. You either should set the policy to ALLOW or create the rules for your networks which allow the traffic to pass from one interface to the other.

  3. #3
    Just Joined!
    Join Date
    May 2013
    Posts
    3
    Thanks for your reply.
    I enabled the IP forwading using sysctl tool and the net.ipv4.ip_forward variable is 1.
    My question how I set ALLOW or create rule in Ubuntu ?
    Do I need to create rules in client and server? In server there is no rule.

  4. #4
    Just Joined! krokoziabla's Avatar
    Join Date
    Sep 2012
    Location
    Russia
    Posts
    20
    Sorry, the correct rule name is ACCEPT but not ALLOW.

    You can set ACCEPT policy on FORWARD chain on your intermediate node with the following command:

    Code:
    iptables -t filter -P FORWARD ACCEPT
    or you can create rules:

    Code:
    iptables -t filter -A FORWARD -i <wireless interface name> -o <wired interface name> -j ACCEPT
    iptables -t filter -A FORWARD -i <wired interface name> -o <wireless interface name> -j ACCEPT
    To see if the rules/policy is working you can enter the command:

    Code:
    iptables -t filter -L -v
    It will show you if there is any traffic that corresponds to the rules/policy.

  5. #5
    Just Joined!
    Join Date
    May 2013
    Posts
    3
    when I enter "iptables -t filter -L -v" I get "reject-with icmp-port-unreachable" what does mean? still now I can't connect (ping client with server).

  6. #6
    Just Joined! krokoziabla's Avatar
    Join Date
    Sep 2012
    Location
    Russia
    Posts
    20
    Hm. It's strange to see iptables return this message. Usually it's rather used as an option to iptables. For instance,
    Code:
    iptables -t filter -A FORWARD -i <wireless interface name> -o <wired interface name> -j REJECT --reject-with icmp-port-unreachable
    rule would mean All the packets from the wireless to the wired interface should be rejected and the sender should be replied with an ICMP message telling that the port is unreachable. I'm afraid I cannot explain the meaning of the message you get.

Posting Permissions

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