DSM 7.0 Docker with Traefik reverse proxy under Synology DSM 7 // free port 80 and 443

Currently reading
DSM 7.0 Docker with Traefik reverse proxy under Synology DSM 7 // free port 80 and 443

4
3
NAS
DS918+
Hi everyone,
to run docker with the reverse proxy Traefik v2 on a Synology NAS, I need to be able to use port 80 and 443 on the host system. DSM 7 uses its own reverse proxy, nginx, which tries to occupy the ports on its own.
Under DSM 6.2 I could change the port 80 and 443 by using a boot script (change-ports.sh), like described here, so that the ports went free and could be used by docker Traefik reverse proxy.

#! /bin/bash

HTTP_PORT=81
HTTPS_PORT=444

sed -i "s/^\( *listen .*\)80/\1$HTTP_PORT/" /usr/syno/share/nginx/*.mustache
sed -i "s/^\( *listen .*\)443/\1$HTTPS_PORT/" /usr/syno/share/nginx/*.mustache

After upgrading my Synology NAS 918+ to DSM 7, I'm no longer able to "free" port 80 and 443.
Obviously the script doesn't work and Nginx (from DSM) is always blocking the port.

The Question is, how to reach the docker reverse proxy Traefik again, by using port 80/443 under the new OS DSM 7.
On my docker-stack are running a lot of important tool, so I need to finde a way to fix the bug urgently.

Thanks for your help in advance. - Best regads Daniel
 
Just out of curriousity: why do you need Traefik to bind the ports 80 and 443? Is your NAS directly attached to a public internet IP? If you have a router in front of your NAS, you can choose any host port for Traefik and just make sure to forward port 80 and 443 to the host ports of Traefik?
 

Rusty

Moderator
NAS Support
4,378
1,269
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
As @one-eyed-king said. I run my custom proxy like that. Router 443 > custom internal port > custom local container port > 443 container port
 
4
3
NAS
DS918+
Hello, thanks for your answers and advice. I'm not an expert on networking stuff and in the past I was glad the connection on port 80/443 worked.
I have informed myself for a few days now and I would like to try to use the LAN2 interface on the DS only for Docker and Traefik, by set up a macvlan network.

I tried to reach Traefik proxy, like @Rusty described, by forwarding Router 443 > DS Port 447 > custom local container port (447) > 443 container port. But it don't work.
I'm using Cloudflare Services, with an A Record and my own domain.
For example, if I enter https://mycontainer.mydomain.com, I can get no connectionen.

I hope to find a solution in the next days. If you can give me any futher help and tips, i would be glad.
 
4
3
NAS
DS918+
Traefik 2 working again!

I double-checked all steps again, to reach Traefik proxy, like @Rusty described, by forwarding Router 443 > DS Port 447 > custom local container port (447) > 443 container port. I did a mistake by port forwarding on my router. Now everything works fine again.

Thanks for your help - and best regards.

(PS: How could I set the topik as solved?)
 

Rusty

Moderator
NAS Support
4,378
1,269
www.blackvoid.club
NAS
DS718+, DS918+, 2x RS3614RPxs+
Router
  1. RT1900ac
  2. RT2600ac
  3. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Traefik 2 working again!

I double-checked all steps again, to reach Traefik proxy, like @Rusty described, by forwarding Router 443 > DS Port 447 > custom local container port (447) > 443 container port. I did a mistake by port forwarding on my router. Now everything works fine again.

Thanks for your help - and best regards.

(PS: How could I set the topik as solved?)
Well done 😉
 
1
0
NAS
DS1515+
Operating system
  1. macOS
Mobile operating system
  1. iOS
Traefik 2 working again!

I double-checked all steps again, to reach Traefik proxy, like @Rusty described, by forwarding Router 443 > DS Port 447 > custom local container port (447) > 443 container port. I did a mistake by port forwarding on my router. Now everything works fine again.

Thanks for your help - and best regards.

(PS: How could I set the topik as solved?)
Hey man, I think you may have the answer I’ve been seeking all week. Can I please ask- any chance you can show how you set up the port forward?
I can’t figure out what you mean by 443>447>443.
Did you set up 3 separate rules?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Yes cable co replaced it with a pos router, took me forever to configure as I needed a smartphone app to...
Replies
8
Views
122
  • Solved
Solved. Thank you fredbert! Documentation: Place files docker-compose.yml and resolv.conf (see below)...
Replies
2
Views
210
  • Question
That is a MariaDB issue, I had it a while ago, it's due to permission changes they made.. Sorry I can't...
Replies
26
Views
556
Don't worry. Things happen :ROFLMAO:
Replies
19
Views
305
Published here on this forum. Possibly cross links to this forum. Not published elsewhere.
Replies
84
Views
1,390

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top