Fernando Soto
asked on
Apache Web Server - Can not access from outside the server works on URL 127.0.0.1 and from router address 192.168.123.104
Hi Experts;
Thank you for viewing the question.
Trying to learn some cross platform .Net development using Mono on Linux platform.
I have load Linux OS on a box Red Hat Enterprise AS v4, loaded Mono and some other software with no problem. I have loaded Apache web server and I can run it on the local system and access the site through the local address 127.0.0.1. I am able to display web pages and ASP .Net web pages using the address 127.0.0.1. The system is connected to a US Robotics router with its address being 192.168.123.104. On the Linux box if I point the web browser to that address I can also access the site as I did with the 127.0.0.1 address. If I go to another system on the same router and I attempt to access the site on the Linux box I get the message on the browser "FireFox can't establish a connection to the server at 192.168.123.104".
I have checked the router to make sure it is not blocking port 80. I have checked the firewall to see that it was not the problem on the Windows computer connecting to the site, I even turned off the firewall with the same results. I have attempted to connect to the site using Telnet and can not make a connect to port 80. On the Linux side I have checked the iptables - firewall and I am not sure what it all means except it looks good to me, here is the listing.
[root@localhost test]# /sbin/iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Any help will be greatly appreciated.
Thank you.
Fernando
Thank you for viewing the question.
Trying to learn some cross platform .Net development using Mono on Linux platform.
I have load Linux OS on a box Red Hat Enterprise AS v4, loaded Mono and some other software with no problem. I have loaded Apache web server and I can run it on the local system and access the site through the local address 127.0.0.1. I am able to display web pages and ASP .Net web pages using the address 127.0.0.1. The system is connected to a US Robotics router with its address being 192.168.123.104. On the Linux box if I point the web browser to that address I can also access the site as I did with the 127.0.0.1 address. If I go to another system on the same router and I attempt to access the site on the Linux box I get the message on the browser "FireFox can't establish a connection to the server at 192.168.123.104".
I have checked the router to make sure it is not blocking port 80. I have checked the firewall to see that it was not the problem on the Windows computer connecting to the site, I even turned off the firewall with the same results. I have attempted to connect to the site using Telnet and can not make a connect to port 80. On the Linux side I have checked the iptables - firewall and I am not sure what it all means except it looks good to me, here is the listing.
[root@localhost test]# /sbin/iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Any help will be greatly appreciated.
Thank you.
Fernando
ASKER
IP of Linux box Intranet = 192.168.123.104
IP of Windows box Intranet = 192.168.123.101
IP of Windows box Intranet = 192.168.123.101
G'day,
Sorry I thought your US Robotics router was 192.168.123.104. I hope you don't have an IP conflict on the subnet.
Cheers,
Arthur
Sorry I thought your US Robotics router was 192.168.123.104. I hope you don't have an IP conflict on the subnet.
Cheers,
Arthur
ASKER
No there are only two systems on the router.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
G'day,
If you have 2 systems on your router then you should have 3 private IP addresses.
And most probably you have your router running a NAT between your private network and the internet provided by your ISP.
If the linux box and the windows box are on the same subnet (192.168.123.x), I'm inclined to think the problem is not with your router, as the two client machines belong to the same subnet. The problem is either with you windows box or Linux box. Now, since you say it works from the local Linux box but not from the Windows machine, I suggest doing a port scan from both machines to each other and see what results you get. One of the machines must have port 80 been blocked out.
Hope this helps,
Cheers,
Arthur
If you have 2 systems on your router then you should have 3 private IP addresses.
And most probably you have your router running a NAT between your private network and the internet provided by your ISP.
If the linux box and the windows box are on the same subnet (192.168.123.x), I'm inclined to think the problem is not with your router, as the two client machines belong to the same subnet. The problem is either with you windows box or Linux box. Now, since you say it works from the local Linux box but not from the Windows machine, I suggest doing a port scan from both machines to each other and see what results you get. One of the machines must have port 80 been blocked out.
Hope this helps,
Cheers,
Arthur
ASKER
Hi Fardev;
That was it, the page came right up, thank you thank you thank you.
A follow-up on this question. I have mono install on the Linux box which is a cross platform environment to run .Net programs. They have a small web server that works with Apache to handle ASP.Net applications which is called xsp. It works fine when I use the loop back address or the 196.168.123.104 address of the box. But from my window system I get the message "The requested URL /demo/index.aspx was not found on this server". I then made another entry into the iptables files with this entry
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
but that did not make it work. The xsp is listening on port 8080. Would you have any idea on this ?
Thanks.
Fernando
That was it, the page came right up, thank you thank you thank you.
A follow-up on this question. I have mono install on the Linux box which is a cross platform environment to run .Net programs. They have a small web server that works with Apache to handle ASP.Net applications which is called xsp. It works fine when I use the loop back address or the 196.168.123.104 address of the box. But from my window system I get the message "The requested URL /demo/index.aspx was not found on this server". I then made another entry into the iptables files with this entry
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
but that did not make it work. The xsp is listening on port 8080. Would you have any idea on this ?
Thanks.
Fernando
Fernando,
I just took a look at http://www.mono-project.com/ASP.NET. It looks like you either configure apache to use mod_mono and route requests to the mod-mono-server process or you use xsp instead as your http server to route requests to the mod-mono-server process.
From that error message it sounds like if that was the result of a request to http://192.168.123.104:8080/demo/index.aspx the xsp did respond but was unable to find/serve your content. The "man xsp" man page shows that xsp has a -verbose option you can start it with that may give more information as to what it is doing.
If that error message was as a result of a request to http://192.168.123.104/demo/index.aspx though, in that case apache handled the request and unless you have configured mod_mono it will not pass the request to mod-mono-server.
Although it does not sound like it is culprit now, for troubleshooting if you want to have iptables log any packets it rejects so can easily identify what it is blocking add the following line right before the REJECT line which is likely three lines from the end of your /etc/sysconfig/iptables file. This will cause rejected packets to be logged to the /var/log/messages file.
-A RH-Firewall-1-INPUT -j LOG --log-prefix "Rejected "
I just took a look at http://www.mono-project.com/ASP.NET. It looks like you either configure apache to use mod_mono and route requests to the mod-mono-server process or you use xsp instead as your http server to route requests to the mod-mono-server process.
From that error message it sounds like if that was the result of a request to http://192.168.123.104:8080/demo/index.aspx the xsp did respond but was unable to find/serve your content. The "man xsp" man page shows that xsp has a -verbose option you can start it with that may give more information as to what it is doing.
If that error message was as a result of a request to http://192.168.123.104/demo/index.aspx though, in that case apache handled the request and unless you have configured mod_mono it will not pass the request to mod-mono-server.
Although it does not sound like it is culprit now, for troubleshooting if you want to have iptables log any packets it rejects so can easily identify what it is blocking add the following line right before the REJECT line which is likely three lines from the end of your /etc/sysconfig/iptables file. This will cause rejected packets to be logged to the /var/log/messages file.
-A RH-Firewall-1-INPUT -j LOG --log-prefix "Rejected "
ASKER
Hi Fardev;
I have opened another question in reference to the mono part not working. Please if you can take a look at it I think you can get me through this one too.
https://www.experts-exchange.com/questions/22816249/Mono-module-for-Apache-Web-Server-giving-Service-Temporarily-Unavailable.html
Fernando
I have opened another question in reference to the mono part not working. Please if you can take a look at it I think you can get me through this one too.
https://www.experts-exchange.com/questions/22816249/Mono-module-for-Apache-Web-Server-giving-Service-Temporarily-Unavailable.html
Fernando
What's your Lunix box IP? and the IP of the other system you're using to check with?
Sounds like a routing problem.
Cheers,
Arthur