topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday March 29, 2024, 6:27 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: How to determine ipaddress of mini-webserver on a wireless network  (Read 19293 times)

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
I'm testing a software application that also runs a mini-webserver so that it's database can be accessed from the web via port 82.

I made sure that my firewall, I allowed Incoming TCP ports 82 and allowed Outgoing TCP ports 82.

There's one thing that I'm rather confused by.

If I use Windows ipconfig command, I can see my address as 192.168.1.100 (on computer A where the mini-webserver resides)

And if I use http://192.168.1.100:82 I can actually see the data on the mini-webserver, but it is only accessing Computer "A" locally via my wireless network.

If I use a tool like FollowmeIPlite (http://www.snapfiles...re/network/fwip.html), my External IP address is shown as 202.156.173.124 for example.

Now I have 3 computers A, B, C in my home network. Each one of them show exactly the same External IP address 202.156.173.124

But computer "A" is where the mini-webserver resides.

If windows ipconfig command shows :
"A"  ipaddress as 192.168.1.100
"B"  ipaddress as 192.168.1.101
"C"  ipaddress as 192.168.1.102

What would be the correct url to put in a browser for me to access port 82 on computer "A" from anywhere on the internet ?

http://202.156.173.124:82          - This would be incorrect as which of the computers would it refer to since A, B, C has the same External IP address. In fact the browser cannot locate the mini -webserver at all.

http://192.168.1.100:82             - This would be incorrect although it would access the data via the internal network which is not what I want.

So the url is somehow a combination of both.

Is there some software utility that can help me determine the correct answer ?

I would appreciate if someone can point me to a solution ? Thanks

patthecat

  • Member
  • Joined in 2006
  • **
  • Posts: 88
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #1 on: September 23, 2007, 09:53 AM »
The main thing you need to do is called port forwarding from your router on port 82 to a specific computer where your mini webserver is.

Look at the following site: http://www.portforward.com
This shows you how to do it for common routers.

It basically involves going into the router settings and telling it that any incoming requests from the internet on a specific port get redirected to a specific local ip address. In your example, people would refer to your web server as {external ip address}:82
Your router sees that port 82 was requested so it forwards the info to the mapped local ip address 192.168.1.100 where your web server resides.
« Last Edit: September 23, 2007, 09:55 AM by patthecat »

patthecat

  • Member
  • Joined in 2006
  • **
  • Posts: 88
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #2 on: September 23, 2007, 10:02 AM »
Also I don't think you need the firewall setting of outgoing TCP port 82 enabled since web server basically would use port 80 automatically by default which you would have open usually. 

The way I see it, incoming request need to specify the port number since it needs to go to the web server.  But a response to the request can go on port 80 (I think).

Once you have port forwarding enabled see if the "outside" users can connect without the firewall outgoing port 82 configured.


patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #3 on: September 23, 2007, 10:20 AM »
Thanks patthecat for the suggestions on Port forwarding and closing of TCP outgoing.

I tried it and it works.

The only thing is that my Linksys WRT54G dynamically assigns the ip addresses and sometimes I find Computer "A" is assigned 192.168.1.100 and sometimes, after a reboot it is assigned 192.168.1.101.

How does one stop this dynamic assignment.

I was looking through the settings and cannot seem to figure out how to assign static addresses like 192.168.1.100 to say Computer "A".

Any suggestions ?

Thanks again.

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #4 on: September 23, 2007, 10:31 AM »
patteo: you need to disable DHCP (which is what assigns those ips) and configure static ips on the computers, one per computer.

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #5 on: September 23, 2007, 10:51 AM »
patteo: you need to disable DHCP (which is what assigns those ips) and configure static ips on the computers, one per computer.
Actually, while that will work, it is not quite true that it must be disabled.  That router allows you to define a range for DHCP.  Assign the PC a static IP address outside that range, (say 192.168.1.99 for example) and it should stay there.  You may have some other minor things you need to setup - it has been a while since I did that - but you should be able to set it up fine.  All that said, it may be easier to just disable the DHCP if it is only for 3 computers and no one else ever will connect.  It can be another step to improve security that way.
« Last Edit: September 23, 2007, 11:13 AM by steeladept »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #6 on: September 23, 2007, 10:57 AM »
Assign the PC a static IP address outside that range, (say 192.168.1.99 for example) and it should stay there. 
I had no idea about that! Thanks a lot, i think i'm going to do that at home :D

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #7 on: September 23, 2007, 11:20 AM »
Assign the PC a static IP address outside that range, (say 192.168.1.99 for example) and it should stay there. 
I had no idea about that! Thanks a lot, i think i'm going to do that at home :D
Yeah, that is how I am setup too.  It makes life easier when you have all the desktops attached.  When you have friends over they can still connect, and if you don't and you see people on it, you know they are taking bandwidth.  Of course that is what the security is for, but you can see how this can be useful for various reasons...

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #8 on: September 23, 2007, 11:24 AM »
patteo: you need to disable DHCP (which is what assigns those ips) and configure static ips on the computers, one per computer.
Actually, that is not quite true.  That router allows you to define a range for DHCP.  Assign the PC a static IP address outside that range, (say 192.168.1.99 for example) and it should stay there.  You may have some other minor things you need to setup - it has been a while since I did that - but you should be able to set it up fine.

But how do you assign the PC a static IP address ?

I have looked in the control panel or just clicking the right clicking the wireless icon in the system tray helped me get to the properties tab and I scroll to the TCP/IP settings where it appears I can set a General and Alternate configuration.

See pics attached

However, since I'm using a laptop for this purpose, if I set a static ip address, and I decide to go sit at Starbucks in a public network, I may possibly find that I'm unable to access the network at all (never mind about the mini-webserver I was referring to earlier), unless somehow the laptop is smart enough to look in the Alternate configuration when I'm out in a public wireless network.

In other words, ideally after configuring, when I'm in my personal home network, it should be smart enough to pick say 192.168.1.99 and when out in the wild public network, my laptop should be smart enough to revert to Dynamic IPs since at that point in time, all I'm interested in is a internet connection ( I won't be worrying about connecting to the mini-webserver - of course it would be nice if I could connect to it - but I don't think I would be able to since I won't be able to set any port forwarding in any case)
 

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #9 on: September 23, 2007, 11:31 AM »
Patteo: From what i understand, the miniserver isn't the laptop, right?
So, you can just assign a fixed ip to the miniserver, and leave your laptop on dynamic ip...

Another option would be to assign a static ip to the laptop on the alternate config, and leave the default config on auto. The problem with this approach is that sometimes it won't work as expected and you have to disconnect/connect a few times until it figures out it should be using the static ip.

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #10 on: September 23, 2007, 11:46 AM »
Actually the mini-webserver is my laptop (call it laptop "A"). So if I take laptop "A" to Starbucks, then if I'm set to a static ip, I might not be able to get a wireless connection at Starbucks unless this Alternate configuration stuff works.

In any case, there may be a alternative solution even if I leave my Linksys Wireless WRT54G router on DHCP, because they have another configuration tab that is called Port Triggering.

It seems, that you can do some settings so that whatever Dynamic IP, I may have been assigned, the router would be smart enough to find it. ie whether I have been dynamically assigned 192.168.1.100 or 101 or 102 etc.

I could be wrong but I'm trying to understand what I'm reading here.

"Port Forwarded Only On Specific IP Address - ZeroPaid
"The answer might be found under port triggering in the tab next to forwarding. I used triggering on my Netgear router and it worked woof well, following my computer to whatever IP it was using that day."
http://www.zeropaid....dex.php/t-43203.html

So if it turns out to be right, that would be ideal - have your cake and eat it, leave my laptop alone, leave the Linksys DHCP setting on, but tweak the Port Triggering tab.

It's a bit of an info overload for my tiny brain - but I hope the solution lies here.

Has anyone heared of Port Triggering before. The Linksys configuration tab on Part Triggering is as clear as mud.

Update:
As far as I can determine, Port Triggering is not the answer.

Port triggering - Wikipedia, the free encyclopedia
"Port triggering"
http://en.wikipedia....wiki/Port_triggering

"The disadvantage of port triggering is that it only allows one client on the network to supply a particular service that uses a particular incoming port. Port triggering is unsuitable for putting servers behind a NAT router because it relies on the computer to make an outgoing connection before it can receive incoming ones; servers should use port forwarding."
http://en.wikipedia....wiki/Port_triggering

I have to rethink this again. Meanwhile, any suggestions would be most welcome.

Thanks once again to everyone who made a suggestion here.
« Last Edit: September 23, 2007, 12:28 PM by patteo »

patthecat

  • Member
  • Joined in 2006
  • **
  • Posts: 88
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #11 on: September 23, 2007, 01:25 PM »
Patteo - glad you were able to sort things out.

You may want to see if your Linksys router has this feature that I have found and used on a business level Netgear router.  The router allows to assign a specific IP address if it sees a specific MAC address from a wired/wireless network card.  For example, router assigns DHCP and wireless card set to get IP address automatically.  Each network card has a unique serial number / MAC address.  You put that MAC address in the router and tell it to reserve/assign a specific local IP address so that anytime that router sees that network card request for an IP address it always assigns the same one.

If your router does not have this feature then you would have to keep on changing your laptop's wireless card to go between specific vs. dynamic IP addressing.  I use NetSetMan, the free version (http://www.netsetman.com) to keep network profiles so I can switch between specific and dynamic ip addresses for the wireless and ethernet network card on my laptop.
« Last Edit: September 23, 2007, 08:28 PM by patthecat »

steeladept

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,061
    • View Profile
    • Donate to Member
Re: How to determine ipaddress of mini-webserver on a wireless network
« Reply #12 on: September 23, 2007, 09:24 PM »
Another option would be to assign a static ip to the laptop on the alternate config, and leave the default config on auto. The problem with this approach is that sometimes it won't work as expected and you have to disconnect/connect a few times until it figures out it should be using the static ip.
I was under the same impression as jgpaiva - that the server was not on the laptop.  In your case, I think the above option is the way to go.  I have never had issues with multiple profiles on my laptops, but they are using the Intel 2200bg wireless card that is VERY GOOD compared to any other card I have seen.  They came with this card and the software (IntelPROSet Wireless) with it allows me to order the profiles.  If it finds the connection for the top profile it stops; if not, it goes to the next to try.  It prevents the issues mentioned.  If you can find a wireless package similar to the PROSet Wireless package and use it in place of Windows wireless services, I think you can avoid the unexpected issues jgpaiva mentioned.

Oh, and if anyone knows of a package as good as Intel's PROSet Wireless package that works on windows with Broadcom wireless cards - PLEASE LET ME KNOW.  I have SO many clients that want wireless on their laptops, and I always direct them to the Intel cards because they work.  The Broadcom cards work fairly well too, but are not 100% Cisco compatible (required for many enterprise wireless setups), and they do not have a good package to manage it.  It is a bit cheaper than the Intel cards though.  I will checkout the NetSetMan, but if others know of any, I am listening.

Thanks.