All posts by Don Matteo

lebt in der Schweiz, ist System Engineer MCP bei A-Enterprise GmbH. Mitglied des UNBLOG Knowledge Network. Author und Blogger zu den Themen, Tutorials für Linux und Open Source.

Disable Network Zeroconf APIPA

How to disable Zeroconf automatic network configuration APIPA, Link-Local for TCP/IP addressing if no DHCP server is available

Disable Network Zeroconf APIPA

ZEROCONF commonly known as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA) uses the range 169.254.0.0/16 for network addresses. This APIPA addressing is activated by default, this are often not desired by system administrators.

Most Windows versions and Linux distributions use zero network configuration (ZEROCONF) to automatically configure the network without a central instance, i.e. without the need for a DHCP or DNS server to be present in a network. ZEROCONF published at IETF that plans and coordinates a number of dynamic protocols. It is intended to enable an operating system to automatically configure networks.

Windows disable network APIPA ZEROCONF

Under Windows network APIPA ZEROCONF can be disable due modify the registry, to do it with open the command prompt as administrator and run the REG command with Copy & Paste.

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v IPAutoconfigurationEnabled /t REG_DWORD /d "00000000" /f

Linux disable ZEROCONF

In Linux edit the network file and insert ZEROCONF = YES or NO.

$ sudo vi /etc/sysconfig/network

NOZEROCONF=yes

RHEL / Fedora / CentOS configuring as follows.

$ service network restart

Debian – Ubuntu avahi-daemon

For Linux Mint and Ubuntu the avahi-daemon configuration has to be changed.

$ sudo vi /etc/default/avahi-daemon

AVAHI_DAEMON_DETECT_LOCAL=0

Now restart Linux Mint / Ubuntu avahi-daemon.

$ sudo /etc/init.d/avahi-daemon restart

The avahi-daemon should do not start automatically on system boot.

$ update-rc.d -f avahi-daemon remove

Using RHEL or CentOS run this command.

$ chkconfig avahi-daemon off

Network Zero-configuration

Network Zero-configuration (zeroconf), also know as APIPA and Link-local is a set of technologies that automatically creates a usable computer network based on the Internet Protocol Suite (TCP/IP) when computers or network peripherals are interconnected. It does not require manual operator intervention or special configuration servers. Without zeroconf, a network administrator must set up network services, such as Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS), or configure each computer’s network settings manually.

Zeroconf is built on three core technologies: automatic assignment of numeric network addresses for networked devices, automatic distribution and resolution of computer hostnames, and automatic location of network services, such as printing devices.

Enable Synology SSH root Login

Synology from DSM 6 offers the possibility like for Linux experts to use the SSH terminal, able to login as root. NAS are mostly behind firewalls and cannot be reached from Internet side via SSH, login as a user with subsequent “sudo su root” is considered as an additional effort. However, there is the option of logging in as root, as shown below.

First, the DSM Control Panel is called up, Extended mode must be activated so that the required icon Terminal & SNMP appears.

Control panel

Under Terminal & SNMP the SSH-Service just can enable.

SSH-Service enabled

Now establish an SSH connection to the Synology Diskstation using PuTTY or KiTTY and log in as admin, then change the root password.

sudo synouser -setpw root admin_passwort

Instead of admin_password, enter the same admin password that is used when logging in to Synology DSM.

A message appears that you should respect privacy and be careful when typing. With great power comes great responsibility.

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password:

  The password must be confirmed a second time for security.

Configure Synology SSH service to enable root login.

sudo vi /etc/ssh/sshd_config

Modify by press the i key the option #PermitRootLogin prohibit-password marked as a comment line by removing the # beforehand and set to yes.

PermitRootLogin yes

Save in vim with press the ESC key and hit ZZ (uppercase).

Now restart the DiskStation, or deactivate and reactivate the SSH service in the Control Panel, the change will take effect, now root@diskstation can log in directly to the Synology NAS.

  If you want to log in as root with WinSCP, the transmission protocol SCP (not SFTP) must be selected.