Networking Forums

Networking Forums > Computer Networking > Linux Networking > getting /etchosts from linksys router

Reply
Thread Tools Display Modes

getting /etchosts from linksys router

 
 
Philip
Guest
Posts: n/a

 
      09-30-2003, 07:21 PM
I have a 4 port linksys internet router as my DHCP server.

My RH9 box /etc/hosts file is hand generated to include the local dynamic IPs it
hands out to my other Windows boxes. Fortunately it always hands out the same IP
address as long as I do not move the boxes around from port to port.

Is there any way to get the /etc/hosts entries more automatically.

 
Reply With Quote
 
 
 
 
Paul Lutus
Guest
Posts: n/a

 
      10-01-2003, 12:38 AM
Philip wrote:

> I have a 4 port linksys internet router as my DHCP server.
>
> My RH9 box /etc/hosts file is hand generated to include the local dynamic
> IPs it hands out to my other Windows boxes. Fortunately it always hands
> out the same IP address as long as I do not move the boxes around from
> port to port.
>
> Is there any way to get the /etc/hosts entries more automatically.


If this is a local network, and if the machine addresses do not change, and
if you do not want them to change, why are you using dynamic address
assignment? Just assign addresses the old-fashioned way by typing them into
/etc/hosts. Make copies on each machine.

--
Paul Lutus
http://www.arachnoid.com

 
Reply With Quote
 
Matt
Guest
Posts: n/a

 
      10-01-2003, 01:55 AM
Philip wrote:

> I have a 4 port linksys internet router as my DHCP server.
>
> My RH9 box /etc/hosts file is hand generated to include the local
> dynamic IPs it hands out to my other Windows boxes. Fortunately it
> always hands out the same IP address as long as I do not move the boxes
> around from port to port.
>
> Is there any way to get the /etc/hosts entries more automatically.
>


I'm sure you could cook something up using some of the smb
tools...findsmb comes to mind ( included with samba ). Take the output
of that, slice + dice, and dump into /etc/hosts.

Personally, I'd use a more full featured dhcp server, in conjunction
with bind and Dynamic DNS. Have your dhcpclient register with your dns
server, and forget about /etc/hosts. You could also configure bind as a
caching server, to speed up hostname resolution for all clients...
OK, so maybe it's overkill...But not really all that hard.


--
- Matt -

 
Reply With Quote
 
Philip
Guest
Posts: n/a

 
      10-01-2003, 02:45 PM
Paul Lutus wrote:
> Philip wrote:
>
>
>>I have a 4 port linksys internet router as my DHCP server.
>>
>>My RH9 box /etc/hosts file is hand generated to include the local dynamic
>>IPs it hands out to my other Windows boxes. Fortunately it always hands
>>out the same IP address as long as I do not move the boxes around from
>>port to port.
>>
>>Is there any way to get the /etc/hosts entries more automatically.

>
>
> If this is a local network, and if the machine addresses do not change, and
> if you do not want them to change, why are you using dynamic address
> assignment? Just assign addresses the old-fashioned way by typing them into
> /etc/hosts. Make copies on each machine.


Well that is what I did do, and you are right, the addresses do not change
unless I disturb the local network. So it is not a big inconvenience to do it
manually.

The reason for the post was that I did disturb the local network recently, and
it took me awhile to reset the port forwarding settings in the linksys router to
the new ip addresses. I was just looking to see if there is a pre-existing
automatic way to do this that I was unaware of.

Thanks for the verification that I am not doing it a "stupid" way

 
Reply With Quote
 
Philip
Guest
Posts: n/a

 
      10-01-2003, 03:23 PM
Matt wrote:
> Philip wrote:
>
>> I have a 4 port linksys internet router as my DHCP server.
>>
>> My RH9 box /etc/hosts file is hand generated to include the local
>> dynamic IPs it hands out to my other Windows boxes. Fortunately it
>> always hands out the same IP address as long as I do not move the
>> boxes around from port to port.
>>
>> Is there any way to get the /etc/hosts entries more automatically.
>>

>
> I'm sure you could cook something up using some of the smb
> tools...findsmb comes to mind ( included with samba ). Take the output
> of that, slice + dice, and dump into /etc/hosts.


Ok I can take a look at that. I am fairly new to network admin, so these hints
help a lot. This is a home-local network, BTW with the linksys as the DHCP
server and dsl PPPoE agent.

> Personally, I'd use a more full featured dhcp server, in conjunction
> with bind and Dynamic DNS. Have your dhcpclient register with your dns
> server, and forget about /etc/hosts. You could also configure bind as a
> caching server, to speed up hostname resolution for all clients...
> OK, so maybe it's overkill...But not really all that hard.


Hmmm, well that does sounds a bit overkill. If I understand what you propose, it
would mean that I relegate my linksys to the role of just a bridge and make my
linux box do the work of a DHCP server and DNS. It does solve the /etc/hosts
issue though. Would I keep the linksys inline to do the PPPoE authentication? Or
would I put the linux box as the front end to the dsl modem and get another NIC
to service the other nodes on the local network?


Another thought, my primary DNS is provided by yahoo dsl (nee pacbell dsl).
Would they allow me to register my linux box which I expose to the internet via
port forwarding on my linksys internet router? If so how do I register? Would my
domain be *.pacbell.net?

 
Reply With Quote
 
Matt
Guest
Posts: n/a

 
      10-01-2003, 07:55 PM
Philip wrote:

> Matt wrote:
>
>> Philip wrote:
>>
>>> I have a 4 port linksys internet router as my DHCP server.
>>>
>>> My RH9 box /etc/hosts file is hand generated to include the local
>>> dynamic IPs it hands out to my other Windows boxes. Fortunately it
>>> always hands out the same IP address as long as I do not move the
>>> boxes around from port to port.
>>>
>>> Is there any way to get the /etc/hosts entries more automatically.
>>>

>>
>> I'm sure you could cook something up using some of the smb
>> tools...findsmb comes to mind ( included with samba ). Take the
>> output of that, slice + dice, and dump into /etc/hosts.

>
>
> Ok I can take a look at that.


Forgot to mention nmblookup, also included with Samba. You should be
able to use either of those commands to query your local net, get the
names of the Windows machines, and then process the output and dump it
into your hosts file. Good Shell programming exercise.

> I am fairly new to network admin, so these
> hints help a lot. This is a home-local network, BTW with the linksys as
> the DHCP server and dsl PPPoE agent.


That's basically the same setup I have...Except I turned off DHCP on the
Linksys, and use dhcpd on a freebsd box, as well as dns.

>
>> Personally, I'd use a more full featured dhcp server, in conjunction
>> with bind and Dynamic DNS. Have your dhcpclient register with your
>> dns server, and forget about /etc/hosts. You could also configure
>> bind as a caching server, to speed up hostname resolution for all
>> clients...
>> OK, so maybe it's overkill...But not really all that hard.

>
>
> Hmmm, well that does sounds a bit overkill. If I understand what you
> propose, it would mean that I relegate my linksys to the role of just a
> bridge and make my linux box do the work of a DHCP server and DNS.


Basically correct. See below.

> It
> does solve the /etc/hosts issue though. Would I keep the linksys inline
> to do the PPPoE authentication?


That's what I do...The linksys doesn't have to change, other than
turning off it's DHCP "server".

> Or would I put the linux box as the
> front end to the dsl modem and get another NIC to service the other
> nodes on the local network?


You could. There's no reason you can't use Linux instead of the
Linksys...I just like the Linksys because it's small, quiet and
simple...Oh and the model I have *is* running Linux as it's embedded
OS...Pretty cool.
http://www.linksys.com/support/gpl.asp

>
> Another thought, my primary DNS is provided by yahoo dsl (nee pacbell
> dsl). Would they allow me to register my linux box which I expose to the
> internet via port forwarding on my linksys internet router? If so how do
> I register? Would my domain be *.pacbell.net?


they might. Have to talk to them about that.
you could also use one of the free or cheap Dynamic DNS providers.
TZO.com, dyndns.org, etc. Some of the Linksys routers have a Dynamic
DNS client built in. Also pretty cool.

I guess it comes down to how much you want to do...Using Linux provides
more flexibility, but to do it correctly requires more knowledge.
Me ? I'm paranoid, so I don't want my "firewall" doing anything but
being a firewall. And I'd rather not dedicate a pc to that, when I can
get the functionality I *need* from something like the Linksys. Note I
said need, not want. OK, I'm getting OT here. these are just *my*
preferences...Play around, and see what suits you best.


--
- Matt -


 
Reply With Quote
 
bill davidsen
Guest
Posts: n/a

 
      10-17-2003, 06:40 PM
In article <(E-Mail Removed)>, Philip <(E-Mail Removed)> wrote:
| Paul Lutus wrote:
| > Philip wrote:
| >
| >
| >>I have a 4 port linksys internet router as my DHCP server.
| >>
| >>My RH9 box /etc/hosts file is hand generated to include the local dynamic
| >>IPs it hands out to my other Windows boxes. Fortunately it always hands
| >>out the same IP address as long as I do not move the boxes around from
| >>port to port.
| >>
| >>Is there any way to get the /etc/hosts entries more automatically.
| >
| >
| > If this is a local network, and if the machine addresses do not change, and
| > if you do not want them to change, why are you using dynamic address
| > assignment? Just assign addresses the old-fashioned way by typing them into
| > /etc/hosts. Make copies on each machine.
|
| Well that is what I did do, and you are right, the addresses do not change
| unless I disturb the local network. So it is not a big inconvenience to do it
| manually.
|
| The reason for the post was that I did disturb the local network recently, and
| it took me awhile to reset the port forwarding settings in the linksys router to
| the new ip addresses. I was just looking to see if there is a pre-existing
| automatic way to do this that I was unaware of.
|
| Thanks for the verification that I am not doing it a "stupid" way
|

I'm not sure why ports would matter, you were not clear on what "disturb
the local network" meant. In any case, if you use DHCP on the firewall
and let the machines get the IP from that, at least you will have a
single point of administration, and as long as you don't start doing
things like swapping network cards you can assume the MAC address *is*
the machine, and just do a "machine X" to task "Y" and let the IP stay
on a given task.

So if "web server" is a task and you update to a new machine, you just
plug in the MAC address of the new box. And then if you give the old
machine to a new hire, you assign an IP to "newguy's desktop" and match
the MAC address of the old web server to it.

And you can use subranges to control access (at least simplistically) by
having classes, like 192.168.12.5/28 is untrusted (limited inet access) and
another CIDR block for really trusted people like admins ;-)

Hope some of that is useful.

--
Bill Davidsen <(E-Mail Removed)> CTO, TMR Associates
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously.
-Benjamin Franklin (who would have liked open source)
 
Reply With Quote
 
bill davidsen
Guest
Posts: n/a

 
      10-17-2003, 06:49 PM
In article <3bGeb.32557$(E-Mail Removed)>,
Matt <(E-Mail Removed)> wrote:

| I guess it comes down to how much you want to do...Using Linux provides
| more flexibility, but to do it correctly requires more knowledge.

Truer words were never spoken.

| Me ? I'm paranoid, so I don't want my "firewall" doing anything but
| being a firewall. And I'd rather not dedicate a pc to that, when I can
| get the functionality I *need* from something like the Linksys. Note I
| said need, not want. OK, I'm getting OT here. these are just *my*
| preferences...Play around, and see what suits you best.

I don't trust a firewall I didn't do myself from the bottom up. That's
me, and I invested $200 in a Wal-Mart "Lindows" system, and $7 in
another NIC, just so I can have my own firewall.

Of course I have lots of logging, intrusion detection, nasty fakery,
etc, added. But if you don't do it for a living one of the canned
firewalls is a good solution, be it linksys or IPcop on a cheap linux
box.

--
Bill Davidsen <(E-Mail Removed)> CTO, TMR Associates
As we enjoy great advantages from inventions of others, we should be
glad of an opportunity to serve others by any invention of ours; and
this we should do freely and generously.
-Benjamin Franklin (who would have liked open source)
 
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
How to physically attach Linksys high-gain antenna to Linksys router infodel@mac.com Wireless Internet 2 11-19-2006 09:29 AM
Cisco 350 connects to Linksys WAP, not to Linksys ADSL router: helpwith diagnosing? Henry Law Wireless Internet 1 09-26-2005 06:13 PM
Linksys WRE54G, will this device work with a non Linksys Access Point&/or WiFi Router? Coma Wireless Internet 0 08-11-2004 04:48 PM
USING Linksys vpn befvp41 router with Linksys vpn wireless g wrv54g chiantidan Wireless Internet 0 04-13-2004 04:33 AM
Connecting Linksys 802.11G WIFI router to normal Linksys router? System User Wireless Internet 4 08-27-2003 01:35 AM



1 2 3 4 5 6 7 8 9 10 11