Results 1 to 3 of 3

Thread: Unorthodox Network Setup: Ubuntu Gateway, Wireless Router, PCs

  1. #1

    Unorthodox Network Setup: Ubuntu Gateway, Wireless Router, PCs

    Hello all, I've been searching for a solution to this problem for a few weeks and am convinced the answer is out there but I just don't know how to phrase the search in the correct way to get moving on this.

    For various reasons I need to setup the following type of network:

    Internet Connection --> Ubuntu 7.10 PC --> Wireless Router --> Everything Else

    To clarify, I need the Ubuntu PC to act as a gateway (I think this is the proper terminology, correct me if I am wrong) to my ISP which can share the internet connection with my wireless router, which can then distribute the internet to all other PCs/Devices.

    Why don't I just connect the router to my ISP/Modem? The short answer is that I am in a college dorm and it simply will not work. This proposed setup is an attempt at a work-around.

    I have attempted a few configurations I found (for example, to no avail. Any directions/advice/links would be much appreciated.


  2. #2
    Join Date
    Jan 2007
    Adelaide, Australia

    Post RE:Unorthodox Network Setup: Ubuntu Gateway, Wireless Router, PCs

    Ok first of all I will clarify what I think you are trying to do...
    You have a dialup / adsl modem connected to your computer (Ubuntu 7.10, lets call it server), and the internet works on that machine only. From the ethernet port of server you have connected a wireless router. From the wireless router you connect all other computers, (we shall call them clients), without wires of course .
    Now in order to get your clients to connected to the internet you need a firewall and network address translation,(NAT), we shall use the DHCP server on server for address allocation and DNS address of your ISP for the whole network.

    First of all lets deal with the firewall and NAT...
    First make sure you have iptables installed then go to
    and fill in all the values as required this will generate the iptables config script. Copy and paste the script into a file called
    Now sudo into root in a terminal and copy to /usr/local/bin/ and make it executable by chmod +x /usr/local/bin/
    Edit /etc/rc.local and add the line /usr/local/bin/ so it executes every time the server boots.

    Configure your internet connection (if not already done), and then add the line ifup ppp0 (or whatever your internet interface is, this can be found by typing ifconfig -a in the root terminal), to rc.local just above the line. This will suspend booting of the server until ifup returns.

    Now for the DHCP server. Make sure you have the dhcp server installed (apt-get install dhcpd), now what I did was follow this HOWTO -->
    to get the DHCP server up and going.

    Good luck and happy Linuxing

  3. #3
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    I have exactly the same setup even the same software.

    My gateway is Ubuntu 7.10 x64 and Netgear WGR614 V4.

    Instead of messing with iptables and scripts (it can be a bitch to deal with), I use Shorewall as my firewall. It takes care of everything for you.

    Then I configure clients as usual. If you need more details help, post away.
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

Similar Threads

  1. Ubuntu 12.04 LTS Setting Up Network between Xp/7 and Ubuntu 12.04LTS
    By tobiasleesc in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 03-02-2014, 02:46 AM
  2. Ubuntu Gateway Server
    By prats84 in forum Linux - Hardware, Networking & Security
    Replies: 0
    Last Post: 06-30-2008, 11:35 AM
  3. Router setup
    By bkesting in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 01-19-2007, 09:06 PM
  4. Gateway before router
    By Lunke in forum Linux - Hardware, Networking & Security
    Replies: 4
    Last Post: 06-11-2004, 10:39 AM
  5. Question on setting router or gateway
    By wing328 in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 06-11-2002, 08:24 PM


Posting Permissions

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