Menu Close

How to configure reverse proxy on Synology NAS DSM 6 Beta 2

Finally! DSM can now serve as a reverse proxy server. With this build-in feature it is very easy to configure your NAS as a reversed proxy.

In the past you had to rewrite different apache rules with config files

Take a look at this post to see how to configure reverse proxy on the new DSM 6.

How to configure reverse proxy

Login to your DSM via the webinterface. Go to Control Panel –> Application Portal

Synology_DSM6_Reversed-Proxy_1

Synology_DSM6_Reversed-Proxy_2

Go to the Reverse Proxy tab and click on “Create”

Synology_DSM6_Reversed-Proxy_3

Synology_DSM6_Reversed-Proxy_4

In the following example I installed an Application named Sonarr on my Synology NAS. Now I want to access this application with a domainname without port numbers or subfolders.

The reverse proxy will redirect traffic to example.brainpulse:80 to localhost:8989

The result!

Synology_DSM6_Reversed-Proxy_Sonarr_1 Synology_DSM6_Reversed-Proxy_Sonarr_2

24 Comments

  1. Targeter

    on DSM 6.0, it seems impossible to use ports 80 and 443. Do you know how to enable those ports for reverse proxy?

    • Ruben

      No problem using those ports here on DSM 6.0. Remember that you need to actually type the “80” in the field. If you try submit the setting without actually entering it, it will only SUGGEST port 80 in the field. This “80” will be grey, so you need to actually enter it in order to use port 80. Works okay for me.

  2. Targeter

    on DSM 6.0, it seems impossible to use ports 80 and 443. Do you know how to enable those ports for reverse proxy?

  3. Jake Milligan

    I just installed DSM 6.0 an boy do i regret it 🙂

    At work i’m behind a proxy server and i want my “example.synology.me” to be redirected to my NAS.
    Can u plz tell me what i need to fill in in the fields?

  4. Jake Milligan

    I just installed DSM 6.0 an boy do i regret it 🙂

    At work i’m behind a proxy server and i want my “example.synology.me” to be redirected to my NAS.
    Can u plz tell me what i need to fill in in the fields?

  5. Stefan Ostadal

    This is for the beta version of DSM 6 In the final release Synology has reserved port 80 so cannot be entered via the reverse proxy screen.

    You will need to manually edit the /usr/syno/share/nginx/WWWService.mustache file to disable the automatic redirect for port 80 / 443 to 5000/5001 respectively.

    My understanding is Port 80 is reserved so it can be used by the Photostation app.

  6. Stefan Ostadal

    This is for the beta version of DSM 6 In the final release Synology has reserved port 80 so cannot be entered via the reverse proxy screen.

    You will need to manually edit the /usr/syno/share/nginx/WWWService.mustache file to disable the automatic redirect for port 80 / 443 to 5000/5001 respectively.

    My understanding is Port 80 is reserved so it can be used by the Photostation app.

  7. Sergey Sventitski

    To forward all traffic from HTTP port 80 to WebDAV server port 5005
    I created following file in the /etc/nginx/site-enabled folder

    server {
    listen 80;
    server_name yourdomain.com;
    location / {
    proxy_pass http://127.0.0.1:5005;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }

    Hope this will be helpful

  8. Sergey Sventitski

    To forward all traffic from HTTP port 80 to WebDAV server port 5005
    I created following file in the /etc/nginx/site-enabled folder

    server {
    listen 80;
    server_name yourdomain.com;
    location / {
    proxy_pass http://127.0.0.1:5005;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    }
    }

    Hope this will be helpful

  9. pol9520

    I installed Web Station with Apache 2.2 in DSM 6
    I try to add “Listen 80” in “/volume1/@appstore/Apache2.2/usr/local/etc/apache22/conf/httpd22.conf”

    “ServerRoot “/usr/local/etc/apache22″

    Listen 127.0.0.1:914
    Listen 80
    …”

    When I restart Apache, I have this message error : “service [pkgctl-Apache2.2] restart failed, synoerr=[0x0000]”

    I think the problem is that the server have already listening in port 80.

    “sudo netstat -lnp | grep :80”

    “tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6945/nginx: master
    tcp6 0 0 :::80 :::* LISTEN 6945/nginx: master”

Leave a Reply

Your email address will not be published. Required fields are marked *