hacdias / webdav

A simple and standalone WebDAV server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to connect from local network

9r0x opened this issue · comments

Connection succeeded from the same laptop(mac os) running the service, but not for other clients in the same local network. I could access HTTP servers the same way from local network, so probably not a network issue.

What's your configuration? We can't help without knowing your entire setup and errors you're seeing

@mohammed90 I'm using a slightly changed config from the one provided:

# Server related settings
address: 0.0.0.0
port: 0
auth: true
tls: false
cert: cert.pem
key: key.pem
prefix: /
debug: false

# Default user settings (will be merged)
scope: .
modify: true
rules: []

users:
  - username: admin
    password: admin

You have port: 0 in your config. Are you capturing the assigned port number from the logs and using that accordingly?

I got assigned a random(or pre-defined, idk) port when leaving this as 0; even if I changed this to correct values like 3000, 8888, … I still cannot access it.

Also, I can access it from the same laptop using <IP>:<port>, not just 0.0.0.0:<port>

Are you actually using 0.0.0.0:<port> instead of the actual IP address of the - device? If so, then that's the issue. The 0.0.0.0 tells webdav to listen on all interfaces, in case the device has multiple network cards. You should use the IP address of your device.

I see. Correct me if I'm wrong, I changed part of the config to

# Server related settings
address: 192.168.0.21
port: 57211

where 192.168.0.21 is the laptop's IP.

On the same laptop, I can visit 192.168.0.21:57211. But within the same network, a cellphone or any other device failed to load 192.168.0.21:57211 (does not show the request in logging either).

I don't think it's my network config issue either, because I can host an HTTP server with the same laptop.

Many more people use this project where it's exposed from their device to a local or external network without issues, and I am one of the users who has it 2 layers inside a network and accessing it externally. There's no issue with this project rather some configuration needs to be corrected on your device and/or network. Do you have firewall on the laptop? You can still keep 0.0.0.0 if you want to expose it to all interfaces on the network, but you have to use the correct IP address of the server when accessing it from another device.