LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Port forwarding for web server not working (https://www.linuxquestions.org/questions/linux-networking-3/port-forwarding-for-web-server-not-working-4175470718/)

sudeep_mansh 07-24-2013 02:23 AM

Port forwarding for web server not working
 
Hello,

I have started apache web server(LINUX SYSTEM) and I want that to be accessed using my static IP from outside. I have set the NAT. But when I try to access the IP it asks for router username/password. My router is not forwarding the webport.

Below is the structure of my network. (We have a LAN)
1. DSL modem is (DNA-A211-I).
2. Modem is connected to internet in ppp0E mode
3. Modem line is connected to a proxy server (192,168.15.100)
4. The apache runs in the proxy server.
5. From the proxy the line connects to a switch which inturn connect to our internal LAN network.

I have set the NAT for port 80(incoming/outgoing) to 192.168.15.100:80. but still I am unable to solve.

Do i have to edit the httpd.conf file?
or do i have to do anything else...
Please help


thanks.

evo2 07-24-2013 02:36 AM

Hi,

not sure, but you may need to disable the router from providing its web configuration on the external network interface (presumably that is why you are begin prompted for the router usrname/password).

What happens if you try to use a different port on the router (eg forward port 8080 on the router to 192.168.15.100:80)?

Evo2.

sudeep_mansh 07-24-2013 02:47 AM

I get the same prompt if i use a different port.

evo2 07-24-2013 02:51 AM

Hi,
Quote:

Originally Posted by sudeep_mansh (Post 4995711)
I get the same prompt if i use a different port.

Sorry, that makes no sense to me. Are you saying that your router is running a web server on all ports on its external interface?

Evo2.

sudeep_mansh 07-24-2013 02:58 AM

Sorry... I was wrong.. If i forward 8080 on to port 192.168.15.100:80 i get an error "unable to connect".

sudeep_mansh 07-24-2013 03:39 AM

Please help.....

scourgebg 07-24-2013 03:58 AM

I am sorry if it is a stupid suggestion but is the httpd service is running ? (/etc/init.d/httpd status)

If it is running so it will be work great in local network ... - try it. If the problem is not only on Public IP address so you didn't set everything in modem or router firewall.

Best regards
Yavor

sudeep_mansh 07-24-2013 04:31 AM

the http is running. If i give the local server address 192.168.15.100 it shows the apache test page. Locally within the LAN the web server is accessible. But from outside, if i access using static ip it display router page instead of forwarding to the web server.

scourgebg 07-24-2013 07:08 AM

Hmmm.. Where did you set NAT(on which device) and how you do it ?

sudeep_mansh 07-24-2013 07:43 AM

Most of the problem is now solved. I am now out of my LAN area and just tried if it works..... Thank God now i am able to access my webserver from outside. But I think from within the LAN it show s the router page when i try to access static IP.. I have to check tomorrow and will post the status...


All times are GMT -5. The time now is 11:46 PM.