LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Unable to Access Server from Windows Network (https://www.linuxquestions.org/questions/linux-server-73/unable-to-access-server-from-windows-network-922383/)

psoheil 01-06-2012 07:03 AM

Unable to Access Server from Windows Network
 
Hello All,

I have a brand new CentOS 6.2 Web Server on which Apache is up and running and I can access it through localhost, loop back ip and local IP when I am on the Server itself, but I am not able to access it using local network IP from any other workstation on the windows Network. I did configure static IP, network Mask, Gateway and DNS during installation on the same screen where you name the Server.

Does anyone have any idea what may be the problem and how to fix it?

Thanks
Pete

TenTenths 01-06-2012 07:25 AM

You don't say how you're trying to "access" your server, http?, telnet?, ssh?, ftp?, sftp? etc. etc. etc.

Meet us half way and give us a clue.

Also include what diagnostics etc. you're already tried.

psoheil 01-06-2012 08:10 AM

I should have been more specific, I am NOT able to access using HTTP and FTP but I am able to access it using SSH. Please let me know what type of diagnostic info I need to provide.

Pete

TenTenths 01-06-2012 08:13 AM

For ftp, what ftp server are you using? Check any configs for that daemon and look to see if there's any deny/allow in place.
For http, check /var/loh/httpd/error_log and see what results you get when accessing from a remote machine. Also check any firewall you have in place on the server and ensure that port 80 is open.

The fact that you can access with SSH is a good thing and shows that your network is working at least.

psoheil 01-06-2012 09:21 AM

Quote:

Originally Posted by TenTenths (Post 4567903)
For ftp, what ftp server are you using? Check any configs for that daemon and look to see if there's any deny/allow in place.

It is using vsftpd for FTP, which made me realize just now that I may have to use SFTP to access. I tried SFTP which now gives me ftp access to the server for all users.

Quote:

Originally Posted by TenTenths (Post 4567903)
For http, check /var/loh/httpd/error_log and see what results you get when accessing from a remote machine. Also check any firewall you have in place on the server and ensure that port 80 is open.

Here is what I have in the error_log file. Not very helpful, because it only shows the access attempts I made from the local server, and doesn't show any access error from remote workstation:

Code:

[Thu Jan 05 05:38:53 2012] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Thu Jan 05 05:38:53 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jan 05 05:38:53 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 05 05:38:53 2012] [notice] Digest: done
[Thu Jan 05 05:38:53 2012] [warn] mod_wsgi: Compiled for Python/2.6.2.
[Thu Jan 05 05:38:53 2012] [warn] mod_wsgi: Runtime using Python/2.6.6.
[Thu Jan 05 05:38:53 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Thu Jan 05 05:39:07 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Thu Jan 05 05:39:07 2012] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Thu Jan 05 05:39:10 2012] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Thu Jan 05 05:39:25 2012] [error] [client 10.10.86.96] Directory index forbidden by Options directive: /var/www/html/
[Thu Jan 05 05:39:25 2012] [error] [client 10.10.86.96] File does not exist: /var/www/html/favicon.ico
[Thu Jan 05 05:39:28 2012] [error] [client 10.10.86.96] File does not exist: /var/www/html/favicon.ico
[Thu Jan 05 08:47:44 2012] [error] [client 10.10.86.96] File does not exist: /var/www/html/phpinfo.jphp
[Thu Jan 05 08:47:52 2012] [error] [client 10.10.86.96] PHP Warning:  phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CST/-6.0/no DST' instead in /var/www/html/phpinfo.php on line 3

Same goes for the access_log. It looks like requests from outside the server don't even get to the web server, since I don't see any windows requests and my remote workstation is windows:

Code:

127.0.0.1 - - [05/Jan/2012:05:39:07 -0600] "GET / HTTP/1.1" 403 5039 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
127.0.0.1 - - [05/Jan/2012:05:39:07 -0600] "GET /icons/apache_pb.gif HTTP/1.1" 200 2326 "http://127.0.0.1/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
127.0.0.1 - - [05/Jan/2012:05:39:07 -0600] "GET /icons/poweredby.png HTTP/1.1" 200 3956 "http://127.0.0.1/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
127.0.0.1 - - [05/Jan/2012:05:39:07 -0600] "GET /favicon.ico HTTP/1.1" 404 284 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
127.0.0.1 - - [05/Jan/2012:05:39:10 -0600] "GET /favicon.ico HTTP/1.1" 404 284 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:05:39:25 -0600] "GET / HTTP/1.1" 403 5039 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:05:39:25 -0600] "GET /icons/apache_pb.gif HTTP/1.1" 200 2326 "http://10.10.86.96/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:05:39:25 -0600] "GET /icons/poweredby.png HTTP/1.1" 200 3956 "http://10.10.86.96/" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:05:39:25 -0600] "GET /favicon.ico HTTP/1.1" 404 286 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:05:39:28 -0600] "GET /favicon.ico HTTP/1.1" 404 286 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:45:24 -0600] "GET / HTTP/1.1" 200 106 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:47:44 -0600] "GET /phpinfo.jphp HTTP/1.1" 404 287 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:47:52 -0600] "GET /phpinfo.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524 "http://10.10.86.96/phpinfo.php" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:47:52 -0600] "GET /phpinfo.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146 "http://10.10.86.96/phpinfo.php" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:47:51 -0600] "GET /phpinfo.php HTTP/1.1" 200 52543 "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"
10.10.86.96 - - [05/Jan/2012:08:54:32 -0600] "GET / HTTP/1.1" 304 - "-" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 CentOS/3.6.24-3.el6.centos Firefox/3.6.24"

Your last suggestion is what made the whole thing work. I could have sworn I had the firewall disabled, but it looks like the firewall was turned on! I added an exception for "WWW (HTTP)" and "Secure WWW (HTTPS)" to the firewall and it started working. Thank you very much for your help!

Pete

TenTenths 01-06-2012 09:39 AM

Quote:

Originally Posted by psoheil (Post 4567946)
Your last suggestion is what made the whole thing work. I could have sworn I had the firewall disabled, but it looks like the firewall was turned on! I added an exception for "WWW (HTTP)" and "Secure WWW (HTTPS)" to the firewall and it started working. Thank you very much for your help!

Pete

You're welcome, glad you got sorted.


All times are GMT -5. The time now is 08:44 PM.