You are not logged in.

#1 2008-09-05 16:27:33

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

[solved] Port forwarding based on hostname rather than IP address

I have a WRT54GL device that serves as a gateway to 5 computers (some wired and some wireless connections). All client computers get their IP addresses through DHCP, and they are turned off and on frequently, therefore their IP addresses change over time. The default firmware of the router lets me forward ports based on the IP address of the client, but this sucks because the addresses of the clients change over time.

I like DHCP and would like to keep using it. How can I forward ports based on the clients' hostnames, rather than their volatile IP addresses?

One solution I saw is to always assign the same IP address to the same MAC address. I could do that as a last resort (but I haven't found a way to do it with the default firmware), but forwarding based on hostname seems more elegant and less of a hassle. Anyone know how? I'm willing to use differnet firmare (e.g. openwrt) if necessary.

Last edited by peets (2008-09-05 19:33:06)

Offline

#2 2008-09-05 16:31:54

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [solved] Port forwarding based on hostname rather than IP address

on original firmware dhcp cannot be configured to give the same ip for an mac adress. this is why now i use openwrt on wrt54gl.


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2008-09-05 16:39:14

panzer
Member
Registered: 2006-08-28
Posts: 15

Re: [solved] Port forwarding based on hostname rather than IP address

Actually, using the MAC adress to always lease the same IP adress to the same computer is the lesser of a hassle. If you wanted to do it by hostname you'd have to setup a name service on your router (such as DNS or WINS). Each client would have to regsiter it's name and after that you could forward ports to specific computers. Using the MAC adresses really is the easier and better solution, if you ask me.

Offline

#4 2008-09-05 17:15:43

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: [solved] Port forwarding based on hostname rather than IP address

panzer wrote:

Actually, using the MAC adress to always lease the same IP adress to the same computer is the lesser of a hassle. If you wanted to do it by hostname you'd have to setup a name service on your router (such as DNS or WINS). Each client would have to regsiter it's name and after that you could forward ports to specific computers. Using the MAC adresses really is the easier and better solution, if you ask me.

+1

More KISS baby wink


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#5 2008-09-05 19:32:48

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: [solved] Port forwarding based on hostname rather than IP address

huh. I thought the router had a DNS service. OK I'll fiddle with openwrt with mac<->IP DHCP. Thanks all.

Offline

Board footer

Powered by FluxBB