Caddy: Windows: bind to different NIC

Created on 25 Jan 2017  路  5Comments  路  Source: caddyserver/caddy

1. What version of Caddy are you running (caddy -version)?

0.9.5 on Windows 8.1

2. What are you trying to do?

I want to bind to a certain IP address on a particular virtual network port, and Caddy and/or Windows are binding to the primary NIC.

3. What is your entire Caddyfile?

:2000
bind 10.147.17.229
root c:\users\me\music
browse

4. How did you run Caddy (give the full command and describe the execution environment)?

I run by double-clicking caddy_windows_amd64.exe

5. What did you expect to see?

I'm expecting to be able to connect to 10.147.17.229 from a machine that's also in the same subnet of 10.147.17.0

6. What did you see instead (give full error messages and/or log)?

 % curl http://10.147.17.229:2000
curl: (7) Failed to connect to 10.147.17.229 port 2000: Operation timed out

7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?

  1. Add a secondary/alias IP to your primary NIC: http://stackoverflow.com/questions/8944860/how-to-create-an-ip-alias-on-windows

  2. Start Caddy without any bind requirements and verify you're able to connect via both IP addresses and/or ports.

  3. I'm using zerotier to create a VPN between my Windows machine and machines in a remote area. Both are on the same logical network and can ping each other. Creating this logical network in Windows and non-windows creates a secondary interface.

  4. Find that secondary interface IP address and bind to it in your Caddyfile.

  5. Can you connect to Caddy from the remote machine? I can't

help wanted

Most helpful comment

I'm going to close this. I think it's a non-issue.

All 5 comments

I should note that I can bind to 10.147.17.x on a FreeBSD machine with this config:

:80
bind 10.147.17.201
tls off
root /home/jugle/site
browse

As you see, it's very similar to the one for Windows.

Are there any logs and/or additional steps I can take to narrow down this issue?

Sorry for the lack of response on this, @jungle-boogie - you caught me at a really busy time and I still don't have Windows (the repro instructions are a bit involved).

You might try running Caddy with the -log flag to get extra output in case there's anything there. Otherwise, I honestly have no idea. (Not experienced with Windows or NICs...)

I think this was a configuration issue. I'll re-test and close if that's the case.

I'm going to close this. I think it's a non-issue.

Was this page helpful?
0 / 5 - 0 ratings