Synology Tricks

  1. Install Community App Store 
    1. # ssh to your NAS first
      sudo -i
      mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt.bak
      curl -Lko /etc/ssl/certs/ca-certificates.crt https://curl.se/ca/cacert.pem
  2. SynoCommunity Packages
    1. SynoCommunity
    2. Home & News | Community Package Hub (cphub.net)

  3. FFMPEG - solve cannot covert to mpeg4 issue
    1. How to enable DTS support on Synology – Costigator

  4. PPTP Server
    1. On Package Manager, add "VPN Server" 
    2. Enable PPTP Server
    3. On Firewall, add port forward for TCP 1723

  5. Install Windows 10/Windows 2016 on Virtual Machine Manager (VMM) on DSM 6.2.3
    1. In Virtual Machine page, click "Create".
    2. Operation System - choose "Others" for Operation System. Then click Next.
    3. Storage Location - click Next to confirm the storage location.
    4. General Specification - 
      1. Select 2 CPU and 2 GB of RAM.  
      2. For Video Card, use vga.  Click Next.
    5. Storage - Create a disk of at least 11GB.  Click the Gear icon.  Select "VirtIO SCSI Controller".  Then click OK.  Click Next.



    6. Configure Network - For network card, click the Gear icon and change the model to "virtio". Click OK.  Click Next.





    7. Other Settings - 
      1. For "ISO file for bootup", please select or browse your Windows ISO.  
      2. For Additional ISO files, please select "Synology_VMM_Guest_Tool_xxx"

      3. For Firmware, please change to "UEFI".  Click Next.




      4. For CPU, in advanced option, disable "Enable Hyper-V Enlightenments"


    8. For Assign Permission, please select per your requirement and click Next.
    9. On Summary Page, click "Apply" to finish the VM creation.
    10. You should then power on the VM and perform normal OS installation.

  6. Install Windows XP on VMM
    1. Prepare - The VMM_Guest_Tools provied by Synology has no Windows XP support.  Please download oVirt-toolsSetup-4.1-5.fc24.iso from ovirt.org.
    2. Details for VM creation
      1. Operation System - user "Others"
      2. CPU - 2 CPU
      3. RAM - 1GB
      4. Harddisk - 10GB (VMM's minimum).  Use "IDE Controller" for Virtual Disk Controller Type (click the Gear icon)
      5. Network - user "virtio" for model.
      6. Additional ISO file - browse to oVirt-toolsSetup-4.1-5.fc24.iso you just downloaded.
      7. Firmware - Legacy BIOS
    3. OS installation - perform OS installation as normal.
    4. VM Guest Tools installation
      1. Go to E:, run ovirt-guest-tools-setup.exe.
      2. After running this tools, all the device drivers can be recognized except VGA.
    5. Limitation - there is no way to find a VGA driver.

  7. Synology + Zerotier (non-docker solution)
    1. Enable Synology bridging/NAT
      1. ssh to server (you can enable SSH in Synology Control Panel - Terminal)
      2. edit /etc/sysctl.conf, add/update below lines:
        net.ipv4.conf.all.forwarding=1
        net.ipv4.conf.default.forwarding=1
        net.ipv6.conf.all.forwarding=1
        net.ipv6.conf.default.forwarding=1
      3. Apply changes:
        1. sysctl --system
      4. Enable iptables
        sudo -s
        /sbin/iptables -t nat -A POSTROUTING -o ovs_eth0 -j MASQUERADE
        /sbin/iptables -A FORWARD -i ovs_eth0 -o eth50 -m state --state RELATED,ESTABLISHED -j ACCEPT
        /sbin/iptables -A FORWARD -i eth50 -o ovs_eth0
        -j ACCEPT
        (ovs_eth0 is my original LAN.  eth50 is the interface created by Zerotier. Please use "route" command to check your interface name)

      5. Persistent - create a boot-up task in DSM
        1. Login to DSM
        2. Control Panel - Task Scheduler
        3. Create - Triggered Task - User-defined Script
        4. Under "General" Page
          1. Task Name - iptables
          2. Event - keep the default (Boot-up)
          3. Enabled - check the box
        5. Under "Task Settings" Page
          1. copy the script to textbox of User-defined script
        6. Press OK.
        7. Reboot DSM to test out

    2. register at  https://my.zerotier.com/, get the network ID
      1. Under Advanced - Managed Routes
        1. add a static route:
          1. Destination = your local LAN IP address range e.g. 192.168.0.0/24
          2. (via) = your Synology local LAN IP e.g. 192.168.1.2
          3. (Optional) You may need to add 0.0.0.0/0 via 192.168.1.2 if you want to route all traffic on Android via mobile network
        2. better to set an static IP for your synology
    3. Manually install package in Synology
      1. Package Center - add the package via the Manual Install Button
      2. Download spk package file at: Index of /RELEASES/1.8.3/dist/synology/ (zerotier.com)
    4. Open Zerotier app
      1. Enter network ID
    5. Allow device connection in Zerotier
      1. Allow both Synology and your mobile device to connect
      2. better to set an static IP for your Synology
    6. Reference: Using Synology as a ZeroTier Bridge (homeops.tech)

  8. Docker
    1. Running Docker Containers on Synology NAS (linuxhint.com)
  9. File System Check on DSM6
    https://github.com/OliPelz/how-to-fsck-on-synology-dsm6
    https://johanneshertel.wordpress.com/2015/07/03/unmounting-volume1-and-fixing-low-level-file-io-error-on-synology-nas-and-probably-other-linux-based-fileservers/

  10. Synology CLI Cheatsheet
    https://github.com/wuseman/Synology

  11. Service Control
    1. List Service:
      synoservice --status
      synoservicecfg --list
    2. Stop Service
      1. synoservicecfg --hard-stop synoindexd
    3. Start Service
      1. synoservicecfg --hard-start synoindexd
    4. Restart Service
      1. synoservicectl --restart synoindexd
    5. Critical Service to avoid:
      synoovs-db

Comments

Popular Posts