LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   networking routing help needed. (http://www.linuxquestions.org/questions/linux-networking-3/networking-routing-help-needed-812995/)

spezticle 06-08-2010 08:03 PM

networking routing help needed.
 
i know exactly what i need to do, im just not familiar enough with command line to do it properly.

i have 7 computers.
the first 4 are connected to a router via wireless at one end of the house. of the last 3 only 1 will be able to access the router via wireless, so it needs to share it's one wireless connection via ethernet. this computer i'm going to call 'server'

server will have two IP's
wlan0 192.168.1.6 this connects to the router that has internet access.
eth0 i intend to have the following settings
ip:192.168.0.1
sub: 255.255.255.0


eth0 will connect to a second router, where the cat5 cable goes from the server, into the internet port of the router where i will define the router's static IP:
IP: 192.168.0.100
sub: 255.255.255.0
gateway 192.168.0.1

i have then set the router IP for LAN handling as 192.168.27.1 and all ethernet connections will have a 192.168.27.x IP.

so i need to know how to, without a gui application, use the terminal to assign server eth0 a proper IP address, and tell the server to take the connection it has and share it through eth0 to supply internet for the last 2 computers via ethernet.

i had it set up in this way with a windows machine being the one that had the wifi access, but i'd rather have it setup for the ubuntu server to do this task. security is imperative for these 3 remaining machines, so just getting 2 more wifi adapters for a connection to the initial router isn't an option.the 2 that connect to server do so through SSH and though server IS connected via wireless it only makes outward connections through the internet via SSH as well.

please help :)
thanks in advance.

spezticle 06-08-2010 08:28 PM

i tried
Quote:

sudo iptables -t nat -A POSTROUTING -s 192.168.1.6 -o wlan0 -j MASQUERADE
and i know i'm on the right path, but i'm not quite sure where to turn. every time in ifup eth0 wlan0 doesn't have internet access anymore, but as soon as i ifdown eth0 then wlan0 has internet, and the other 2 computers won't communicate through the internet yet.


All times are GMT -5. The time now is 04:36 PM.