0

I'm using ADSL service from ISP. The ADSL modem has only 1 LAN port and that port is connected to my PC.

The LAN IP of my computer is 192.168.1.100, and I have apache running on localhost (127.0.0.1) at port 80.

My setting is as in the image:

https://i.sstatic.net/yQLxd.jpg

However, after saving this NAT setting, I still can not access Apache on my PC (192.168.1.100, port 80) from the Internet.

Any suggestions?

2 Answers 2

1

I have apache running on localhost (127.0.0.1)

Do you have Apache listening on 192.168.1.0/24? If it's only listening on 127.0.0.1 then it will only "hear" connections from your computer.

You should also check that Windows Firewall (or whichever filewall you use) is configured to accept connections on port 80 of your network adapter.

5
  • tks tas, my windows firewall off, my router's firewall off, but why "192.168.1.0:24"? 'cause i thought port 24 is for private mail system
    – nicola
    Commented Apr 9, 2011 at 11:45
  • @nicola - The /24 does not mean port 24. it's a netmask
    – Nifle
    Commented Apr 9, 2011 at 12:29
  • oh yeah, my subnet mark is of classic type: 255.255.255.0., i still cannot make the NAT work. how to make apache listen to that local ip & mask?
    – nicola
    Commented Apr 10, 2011 at 8:24
  • httpd.apache.org/docs/2.2/bind.html Commented Apr 10, 2011 at 21:54
  • @nicola 255.255.255.0 = /24. You can read more about it here. Basically, there are 24 bits in the address before the local network starts (the 1s) and the local addresses are represented by various combinations in the block of 0s: 11111111 11111111 11111111 00000000. Since 8 base-2 1s equal 255 in base 10, you can use 255.255.255.0, or represent it the other way (the proper way, IMO), /24.
    – squircle
    Commented May 9, 2011 at 16:18
0

If you are entering http://192.168.1.100/ into your web browser on your PC, your NAT settings aren't involved, and it should work, without the router being involved.

However, if you're entering that same address into another system across the internet, it won't work, because that address is hidden behind your router's NAT. You need to use the external IP of your router, not your local LAN IP from your PC. Your router configuration should show it somewhere, or a web site like http://www.whatismyip.com/ can tell you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .