Results 1 to 4 of 4

Thread: Trying to turn an Ubuntu machine into a router

  1. #1
    Join Date
    Aug 2006
    Beans
    86

    Trying to turn an Ubuntu machine into a router

    So I am trying to turn an Ubuntu machine into a wireless/ethernet router. I have three NICs installed on the machine:
    • eth0: Connected to modem
    • eth1: Connected to a switch
    • wlan0: Setup in AP (aka hotspot or master) mode


    The idea is that any other computer can connect to the wireless hotspot or the switch and share the internet connection coming from eth0. I have added all the necessary connections using the Network Manager applet and currently it kind of works. The problem is that eth1 and wlan0 are on different subnets:
    • eth1: 10.42.0.x
    • wlan0: 10.42.1.x

    Therefore a computer connected to eth1 via the switch cannot talk to a computer connected to wlan0 via the hotspot. So while all computers can access the internet, it still doesn't quite behave like a regular router.

    How do I get both interfaces on the same subnet or somehow allow communication in between the subnets? I've tried creating a bridge connection using Network Manager but it wouldn't let me activate it.
    I would prefer any solutions to use Network Manager rather than the old ifup ifdown interface.

  2. #2
    Join Date
    Sep 2013
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Trying to turn an Ubuntu machine into a router

    I've never heard of using Ubuntu as a router, but I know of DD-WRT and SmoothWall are OSS for routers and PCs configured as routers. You might give those two options a look.

    SmoothWall:
    http://www.smoothwall.org/

    DD-WRT:
    http://www.dd-wrt.com/site/index

    I did a Google search for Ubuntu as a router and here are two webiste that I found that may pertain to you.

    https://help.ubuntu.com/community/Router

    http://www.yourownlinux.com/2013/07/...as-router.html

    Good luck,
    Chris
    "Ignorance is short-lived, and knowledge is forever."


  3. #3
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    1,879

    Re: Trying to turn an Ubuntu machine into a router

    Quote Originally Posted by UrbenLegend View Post
    The problem is that eth1 and wlan0 are on different subnets:
    • eth1: 10.42.0.x
    • wlan0: 10.42.1.x

    Therefore a computer connected to eth1 via the switch cannot talk to a computer connected to wlan0 via the hotspot. So while all computers can access the internet, it still doesn't quite behave like a regular router.

    How do I get both interfaces on the same subnet or somehow allow communication in between the subnets? I've tried creating a bridge connection using Network Manager but it wouldn't let me activate it.
    I would prefer any solutions to use Network Manager rather than the old ifup ifdown interface.
    That's right.
    Network Manager is intended for desktop client, plus connection-sharing. It's really good at that.
    But it's not designed to be a good bridge GUI, nor control router connections, nor lots of other use cases.

    When I built a router from an Ubuntu Server, I did not use NM at all.

  4. #4
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    1,614
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Trying to turn an Ubuntu machine into a router

    My main Ubuntu server is also a router. I wouldn't know how to do it using Network Manager, as Ian mentioned, but then I have never used Network Manager. My LAN has wireless also, but I cheated for that part of it and configured my wireless router to be a switch (also it is located better for coverage than my server).
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Tags for this Thread

Bookmarks

Posting Permissions

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