On a physical server I have Apache and an WebDav server (PyWebDav3) running. This is a Ubuntu 14.04 server, so with all graphical tools.
The WebDav server is started with the default configuration :
davserver -D /tmp -n
The documentation shows a different host can be used :
-H, --host Host where to listen on (default: localhost)
I need a FQDN. So I execute :
bernard@p7:~$ hostname -f
p7
bernard@p7:~$
And used this when starting WebDav :
bernard@p7:/etc$ davserver -D /tmp -n -H "p7"
2016-07-27 15:42:32,716 WARNING Authentication disabled!
Listening on p7 (8008)
I can access this server local with Firefox with "localhost" in the URLbar. And remote with "192.168.1.101" in the URLbar.
Locally I can access in Firefox localhost:8008. And use Nautilus as WebClient as Fileserver. This works good.
I disabled the firewall on the server with ufw, and now the ufw status is disabled :
bernard@p7:~$ sudo ufw status
Status: inactive
bernard@p7:~$
I check which port is open with :
bernard@p7:~$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1087/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 701/cupsd
tcp 0 0 127.0.1.1:8008 0.0.0.0:* LISTEN 3465/python3
tcp6 0 0 :::80 :::* LISTEN 1131/apache2
tcp6 0 0 ::1:631 :::* LISTEN 701/cupsd
bernard@p7:~$
So PyWebDav3 (which is a Python program) seems to be open on port 8008, but still, after using the "p7" as host only for 127.0.1.1
When using :
davserver -H 192.168.1.101 -D /tmp -n
And tested :
bernard@p7:~$ sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1087/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 701/cupsd
tcp 0 0 192.168.1.101:8008 0.0.0.0:* LISTEN 3743/python3
tcp6 0 0 :::80 :::* LISTEN 1131/apache2
tcp6 0 0 ::1:631 :::* LISTEN 701/cupsd
bernard@p7:~$
Remote telnet call :
bernard@vbox11:~$ telnet 192.168.1.101 8008
telnet: Unable to connect to remote host: Connection timed out
bernard@vbox11:~$
Remote I can not access 192.168.1.101:8008 with Firefox as client it seems to hang. Access with firefox is the same action which I did on the server itself, and did work on the server.
Then I check on the server what happened (message from PyWebDav3) :
Exception happened during processing of request from ('192.168.1.66', 42801)
Traceback (most recent call last):
File "/usr/lib/python3.4/socketserver.py", line 617, in process_request_thread
self.finish_request(request, client_address)
File "/usr/lib/python3.4/socketserver.py", line 344, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python3.4/socketserver.py", line 673, in __init__
self.handle()
File "/usr/lib/python3.4/http/server.py", line 398, in handle
self.handle_one_request()
File "/usr/lib/python3.4/http/server.py", line 368, in handle_one_request
self.raw_requestline = self.rfile.readline(65537)
File "/usr/lib/python3.4/socket.py", line 374, in readinto
return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
----------------------------------------
So it seems the PyWebDav3 server is not able to handle the request.
In the server in /var/log/auth.log is do not see a message about this refusal.
Two questions :
- What causes this refusal
- How can this be solved