Tunnel not working, EOF

After setting everything up how I’m supposed to and changing settings until they work, I still get this error when i try to access anything: Get "http://localhost:3000/": EOF

Config for that subdomain:

Domain:
[REDACTED]
Server Tunnel Port:
3000
Client:
LunarServer
Target:
127.0.0.1:443
TLS Termination:
server
Allow External TCP:
true
Owner:
admin

In logs, the error shows up as this:
2024/07/27 11:46:07 dial tcp 127.0.0.1:443: connect: connection refused

Troubleshooting steps I’ve done:

  • Allow binding to ports 80 and 443 on server with setcap

  • Change GatewayPorts no in /etc/ssh/sshd_config to GatewayPorts clientspecified

  • Googled it first

Additional useful info:

  • I don’t think i have a ssl cert on the client, that was autoconfigured when i set up boringproxy

  • I’m trying to run a misskey instance

  • Its accessible from 192.168.254.68:3000 but not its url

  • I don’t think i needed the external tcp but it couldn’t hurt for now while im troubleshooting

  • The server running boringproxy is rented and has a dedicated ip

  • The client is my hardware but behind a NAT

Please help, I found nothing on google and I dont have much self-hosting experience.

1 Like

Hi @M0on9,

Thanks for the detailed report. The names you’re using for settings don’t match the latest version of boringproxy. For example, “Target:” is not a proper setting. Can you share your settings using the names from the “Add Tunnel” page on the server so I know for sure what your configuration is?

Thanks,
// &ers

Here’s the settings from the Add tunnel page

Screenshot of the "Add tunnel" page

The names i used for the settings were copied from the View action on the Tunnels page, sorry for the confusion.

No worries, I forgot I used different terminology on the other page so that’s on me.

The thing that sticks out to me from your config is that you’re using port 443 on the client. That’s pretty unusual. Port 443 is used for TLS. If you’re running a TLS service on that port, you’re going to need to use passthrough TLS termination (which is rather untested). If it’s not a TLS service, is there a reason you’re using port 443?

EDIT: My best guess on how to solve your problem is to leave “Server Tunnel Port” as the default (random) value and set “Client Port” to 3000.

It works! Thank you!

1 Like