Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Nov 2000 05:22:28 -0600 (CST)
From:      Mike Meyer <mwm@mired.org>
To:        Tim McMillen <timcm@umich.edu>
Cc:        questions@freebsd.org
Subject:   Re: FreeBSD GW vs Router
Message-ID:  <14865.8308.500683.25409@guru.mired.org>
In-Reply-To: <9008356@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Tim McMillen <timcm@umich.edu> types:
> Ok, thanks for all the info on port forwarding everybody.  But has
> has anybody actually gotten port forwarding to work on the Linksys?
> I need to set up static addressing in order to do that, and I can't get
> static addressing to work.  Here's what I've tried:
> I go in and disable dhcp.  Then I go to the advanced tab, then static
> routing.  I try to add a route like this:

Contrary to what others indicate, you don't need to disable DHCP on
the Linksys to do port forwarding. I haven't played with the DMZ
functionality, but it would surprise me if it behaved differently.

> Destination LAN IP:   192.168.1.101
> Subnet Mask:          255.255.255.0
> Default Gateway:      192.168.1.1   (The Linksys)
> Hop count:            1
>
> I have one static IP and three computers and a printer behind the Linksys.
> When I put in the above values (mostly guesses) in and hit apply, it says
> command completed or some such, but when I hit show routing tables it
> doesn't change at all beyond the default routes.  Tech support was mostly
> clueless, but said I should try an address in the 2-99 range instead of
> 101 or over.  That didn't work either.

Guessing about IP addresses is a bad idea. Things seldom work
reliably.

> 	I'm obviously a little dumb on IP addressing.  I've tried to read
> up on it but don't understand what I read.  What addresses should I pick,
> and once I do, how do I know which computer was set to which?  
> I want to port forward ssh to the FreeBSD box, and I can do the setup
> for that fine, but it won't work until I get the static routing setup.
> I also want static routing for the printer.
> I'd really appreciate any help,

You can pick pretty much whatever you want, and *you* assign the
addresses. That's how you know which box got which address - you gave
it the address. If you want to use the DHCP server on the linksys,
you'll have to pick an address range that is going to be reserved for
DHCP, and go to the DHCP setup page on the Linksys and set it to use
that range. If you're going to leave the linksys at 192.168.1.1, I'd
recommend a power-of-two block of addresses above that, like .1-.16,
then don't use the last two (.15 & .16). Basically, this is treating
that block as if it were subnetted, so you can subnet it painlessly
later if you want to.

Now choose addresses for the machines that are going to have static
IPs *outside* the range you set aside for DHCP. On the FreeBSD box,
you can set that in /etc/rc.conf. Look for something like
'ifconfig_xl0=inet 192.168.1.101', and make sure that "101" is the
value you want to use. Finally, on the LinkSys page for port
forwarding (it's in the advanced settings group), set the range for
the ports you want forwarded to point to the IP address of the machine
it should be talking to. I.e, for sshd, make set the range to [22] ~
[22] and the IP address to the address you chose for the FreeBSD box
(i.e. - 101, if that was right).

Setting up the printer for to enable external access depends on the
printer, and what you want to do with it. If it's a network printer,
assign it an IP address outside the DHCP range, and set it to that.

You may want to consider running a local copy of bind, and pointing
everything you can at that as a first server. That will give you local
caching, and you can then set local hostnames on that machine.

	<mike



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14865.8308.500683.25409>