Networking Forums

Networking Forums > Computer Networking > Linux Networking > Accessing second level network via linksys router and linux box

Reply
Thread Tools Display Modes

Accessing second level network via linksys router and linux box

 
 
Dave
Guest
Posts: n/a

 
      09-12-2003, 02:09 AM
Total Network/linux novice here (This all works by luck not knowledge!!)

I have a linksys BESFR41 (think that's what it is, my old eye cannot read
those small letters any more!) connected to my cable modem and acting as a
firewall and router for my network. I have a web server running on my
network and I forward port 80 to it. That all works ok.
I also have another linux box that is a multi homed box (think that's the
right term). Basically it has a NIX on the 192.168.1 network so it appears
on my normal network but it has another OS running under it (in an emulator)
that also has an emulated network interface within the linux box (still with
me?). That interface is on the 192.168.200 network.
So to get to that system from one of my windows boxes I have to do a route
add to tell my window box that 192.168.1.97 is the gateway to 192.168.200.1
and then everything works fine.
But !
I want to be able to get to that 200 network box from the internet but the
linksys only lets me forward ports to the 192.168.1 network so my question
is - What do I need to setup in either the linksys router or the linux box
so that I can get to the 200 network from the internet.

Any help would be appreciated as I have already wasted half my life trying
to figure this out

Thanks

Dave E

Here's a pic (sort of) of my network:

+<==>Web Server (port 80)

|
Internet >==> Cable modem >==>linksys==192.168.1. network+<====> Other
machines on my network (mostly windoze)

|

+<==>Linux box<==>Emulated NIC<==> 192.168.200 network

Linux is SUSE 8.0 by the way.




 
Reply With Quote
 
 
 
 
/dev/rob0
Guest
Posts: n/a

 
      09-14-2003, 02:31 AM
In article <5V98b.20347$(E-Mail Removed)> ,
Dave wrote:
> on my normal network but it has another OS running under it (in an emulator)
> that also has an emulated network interface within the linux box (still with
> me?). That interface is on the 192.168.200 network.
> So to get to that system from one of my windows boxes I have to do a route
> add to tell my window box that 192.168.1.97 is the gateway to 192.168.200.1
> and then everything works fine.
> But !
> I want to be able to get to that 200 network box from the internet but the
> linksys only lets me forward ports to the 192.168.1 network so my question
> is - What do I need to setup in either the linksys router or the linux box
> so that I can get to the 200 network from the internet.


This is actually pretty simple.

On the router: forward ports desired to end up at 192.168.200.1 to the
Linux IP, 192.168.1.97.

On the Linux box: a rule like this:
iptables -t nat -A PREROUTING -p $PROTO --dport $PORT -j DNAT \
--to 192.168.200.1:$TO_PORT
That's all one virtual command line (note the backslash on the first
line.) $PROTO is either tcp or udp. $PORT is the outside port on the
router. $TO_PORT could be the same or different, but it would be the
port on which the target service is actually listening,

You also have to do this on the Linux box:
echo 1 > /proc/sys/net/ipv4/ip_forward
For the gory details, see the NAT-HOWTO at www.netfilter.org.

You didn't say what the target service was. If you want to have, say, 2
different Web servers, only one of them can have the external port 80.
But in that case it may be possible to set up Apache to forward certain
requests to http://192.168.200.1.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
network actual bitrate (application level, tcp packet level) nirnimesh@gmail.com Linux Networking 1 01-24-2005 11:24 PM
Firewalling at the domain users level instead of network level Santos Linux Networking 1 07-18-2004 02:16 PM
accessing linksys wireless router Tim Deppe Windows Networking 6 01-20-2004 01:15 AM
Full network level broadcast in Linux amesser39@hotmail.com Linux Networking 1 11-10-2003 03:51 PM
cannot ftp client accessing linux router Norbert Liew Linux Networking 2 10-04-2003 02:02 PM



1 2 3 4 5 6 7 8 9 10 11