February 24, 2019

synology ds916 IPs & web ports

create add_extra_ips.sh

ifconfig ovs_eth0:1 10.2.1.11 netmask 255.255.255.0 broadcast 10.2.1.255 up
ifconfig ovs_eth0:2 10.2.1.12 netmask 255.255.255.0 broadcast 10.2.1.255 up
ifconfig ovs_eth0:3 10.2.1.13 netmask 255.255.255.0 broadcast 10.2.1.255 up
ifconfig ovs_eth0:4 10.2.1.14 netmask 255.255.255.0 broadcast 10.2.1.255 up
ifconfig ovs_eth0:5 10.2.1.15 netmask 255.255.255.0 broadcast 10.2.1.255 up

add a task to run the script on boot:
control panel -> task scheduler -> create triggered task
event: boot-up
point to script: /var/services/homes/blender/extraIPs/add_extra_ips.sh

backup this template file

cp /usr/syno/share/nginx/WWWService.mustache /usr/syno/share/nginx/WWWService.mustache.original

and modify the ports in /usr/syno/share/nginx/WWWService.mustache from 80/443 to whatever you want

restart nginx

synoservicecfg --restart nginx

and now either after restarting the nas or running the script manually it should be all good.

blender@Sam:~$ ip addr list ovs_eth0
8: ovs_eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN 
    link/ether 00:11:32:73:3c:7b brd ff:ff:ff:ff:ff:ff
    inet 10.2.1.3/24 brd 10.2.1.255 scope global ovs_eth0
       valid_lft forever preferred_lft forever
    inet 10.2.1.11/24 brd 10.2.1.255 scope global secondary ovs_eth0:1
       valid_lft forever preferred_lft forever
    inet 10.2.1.12/24 brd 10.2.1.255 scope global secondary ovs_eth0:2
       valid_lft forever preferred_lft forever
    inet 10.2.1.13/24 brd 10.2.1.255 scope global secondary ovs_eth0:3
       valid_lft forever preferred_lft forever
    inet 10.2.1.14/24 brd 10.2.1.255 scope global secondary ovs_eth0:4
       valid_lft forever preferred_lft forever
    inet 10.2.1.15/24 brd 10.2.1.255 scope global secondary ovs_eth0:5
       valid_lft forever preferred_lft forever
    inet6 fe80::211:32ff:fe73:3c7b/64 scope link 
       valid_lft forever preferred_lft forever