Category Archives: Howto Tutorials (EN)

Knowledge Network for Tutorials, Howto’s, Workaround, DevOps Code for Professionals.

IPv6 disable on Fedora Linux

IPv6 disable on Fedora Linux

IPv6 may be undesirable in certain situations, disable IPv6 on Fedora Linux for systems that can by only with the IPv4 protocol stack

Fedora and RHEL disable IPv6 stack as follows

vi /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

If one interface should run without IPv6, e.g. ens160.

net.ipv6.conf.ens160.disable_ipv6 = 1

Save the sysctl.conf file and enable the setting.

sysctl -p

If you want to Disable IPv6 on Fedora or CentOS interface during operation, the following command applies.

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6

Alternatively you can run this command in terminal shell.

sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

IPv6 on Fedora is now disabled, a reboot is not necessary.

SSH Server AddressFamily configuration

If the removal of IPv6 for running daemons is a disaster, e.g. SSH Server, the configuration on Fedora or RHEL can be change as follows.

vi /etc/ssh/sshd_config

#AddressFamily any
AddressFamily inet
#or remove hash(#)
#ListenAddress 0.0.0.0
ListenAddress 0.0.0.0

Then restart the SSH daemon.

systemctl restart sshd

Postfix ipv4 loopback interface

Postfix may also require to customize the ipv4 loopback interface.

vi /etc/postfix/main.cf

#inet_interfaces = localhost
inet_interfaces = 127.0.0.1

With CentOS 6, the kernel module can be customized.

vi /etc/modprobe.d/ipv6.conf

options ipv6 disable=1

Disable the IPv6 stack.

chkconfig ip6tables off

Then reboot the system.

reboot

Checking for IPv6 addresses.

ifconfig | grep inet6
ip a | grep inet6

Remarks

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP). The communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion, and was intended to replace IPv4. In December 1998, IPv6 became a Draft Standard for the IETF, which subsequently ratified it as an Internet Standard on 14 July 2017.

IPv6 features

IPv6 is an Internet Layer protocol for packet-switched internetworking and provides end-to-end datagram transmission across multiple IP networks. Closely adhering to the design principles developed in the previous version of the protocol, Internet Protocol Version 4 (IPv4).

Master Browser Lookup

Windows Master Browser Lookup for NetBIOS Name and Elected Master Browser

The folders and printers shared by Windows clients appear in the client network environment. If the network environment remains empty, it is often the computer browser service. Windows attempts to view all PCs on a Windows network in the network environment.

Windows Workstation Service

First, you need to make sure that a Windows network is working properly at all. The Windows Workstation Service and Server services must be running, and the network connection properties must have file and printer sharing and the Microsoft Network Client active, and TCP/IP over NetBIOS must be enabled.

Note that clients that are not in a domain are in the same workgroup, the WORKGROUP and WORKING GROUP are different groups. If all this does not yet lead to success, one should search for the computer on the network, which has been delegated to the master browser.

NetBIOS Name Information

The NBTscan is a program for scanning IP networks for NetBIOS name information. It sends a NetBIOS status query to any address in the specified range and lists received information in a human-readable form. For each responding host, the IP address, NetBIOS computer name, user name, and MAC address of the computer are displayed.

C:\> nbtscan -s: -h -v 192.168.10.0/24

To discover the master browser on a local network, the following content can be created in a batch file.

@Echo Off
Title Master Browser Lookup & Color 1A
call :IsAdmin

if not [%1]==[] goto lookup
echo use: nbt [ip address range]
echo example: nbt 192.168.10.0/24
goto:eof

:lookup
nbtscan -s: -h -v %1 | find "Master Browser"
for /f "delims=" %%A in ('nbtscan -s"   " -h -v %1 ^| find "Master Browser"') do set "var=%%A"
echo .
echo Elected Master Browser on %var:~0,15%
echo .
nbtstat -A %var:~0,15%
pause

:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
 cls & echo You must have administrator rights to continue ... 
 pause & exit
)
cls
goto:eof

Using Copy Paste to the batch file .bat save and, when the IP network is committed, run as an administrator in the command prompt, the program nbtscan.exe and cygwin1.dll must be in the same directory, or the path to the program must be in the search path environment.

Download NBTScan

Master Browser Delegation

Often it helps when the PC of this is the master browser on its network to restart, so the choice to delegate another computer is triggered. Microsoft sets priorities here, by regulating the assignment (election) to the master browser is granted. Administrators don’t just want to leave it to random rules about who master browser should be, to do so, you open Regedit and go to the following key.

HKEY_LOCAL_MACHINE-SYSTEM\CurrentControlSet\Services\Browser\Parameters

Edit the REG_SZ MaintainServerList key and set it to FALSE or TRUE, for disable or enable. For Windows XP and Server 2003, the REG_SZ key is IsDomainMaster with value FALSE / TRUE, and MaintainServerList with the value AUTO / NO / YES. The change does not take effect immediately and may take up to 48 minutes.

Linux Samba Master Browser

For Linux, the Samba configuration file smb.conf is responsible, in the following example, a Samba server with the highest priority is chosen as the master browser, suitable on a network without Windows PDC. In networks in these there is a Windows PDC it is not recommended.

[global]
    domain master = yes
    preferred master = yes
    local master = yes
    os level = 255
Computer browser service architecture
Illustration: Computer Browser Service Architecture

NBTStat is a command-line tool for troubleshooting NetBIOS name over TCP/IP (NetBT) resolution issues, it is part of the Windows standard. It shows protocol statistics and current TCP/IP connections with NetBT.

C:\> nbtstat -A 192.168.10.73
LAN connection 1:
Node IP[192.168.10.73] address: Rang[]e ID: 

NetBIOS name table of the remote computer

    Name          Type  Status
    ---------------------------------------------
    AMX3000       <00>  CLEAR  Registered
    WORKGROUP     <00>  GROUP  Registered
    WORKGROUP     <1C>  GROUP  Registered
    AMX3000       <20>  CLEAR  Registered
    WORKGROUP     <1B>  CLEAR  Registered
    WORKGROUP     <1E>  GROUP  Registered
    ADMINISTRATOR <03>  CLEAR  Registered

    MAC Adresse = 00-0B-AB-0B-11-8E

NetBIOS name tables type <00> is output in hex.</00>

<00> specifies the domain to which this computer belongs
<03> Computer name assigned to the messenger service
<20> Computer name assigned to the server service
<1C> Internet group name registered with domain controller
<1B> Identifying a domain master browser name
<1E> Computer can be used as a backup browser in the domain
<03> Username currently logged on to this computer
<1D> Identify segment master browsers without a domain

Computer browser service