networking – TecAdmin https://tecadmin.net How to guide for System Administrator's and Developers Wed, 24 Aug 2022 10:44:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.1.1 Configuring the Static IPv4 Address on Ubuntu using Netplan https://tecadmin.net/setup-static-ip-address-on-ubuntu-using-netplan/ https://tecadmin.net/setup-static-ip-address-on-ubuntu-using-netplan/#respond Wed, 01 Jun 2022 06:48:07 +0000 https://tecadmin.net/?p=29140 The Ubuntu 17.10 and later systems use the Netplan as a new command-line utility for managing network interfaces. It works with the Systemd-networkd or NetworkManager renderes. Netplan configuration files are written in YAML format, allowing you simple-to-complex networking configurations. Which work from the Desktop to the server and from the cloud to IoT devices. This [...]

The post Configuring the Static IPv4 Address on Ubuntu using Netplan appeared first on TecAdmin.

]]>
The Ubuntu 17.10 and later systems use the Netplan as a new command-line utility for managing network interfaces. It works with the Systemd-networkd or NetworkManager renderes. Netplan configuration files are written in YAML format, allowing you simple-to-complex networking configurations. Which work from the Desktop to the server and from the cloud to IoT devices.

This article will help you to configure static IPv4 addresses on Ubuntu systems using the Netplan command-line tool.

Check the Network Interface Name

First of all, you need to identify the network interface name. It can differ based on the installation type and system environment.

  • To find the interface name type:
    sudo nmcli device status 
    
    Output:
    DEVICE TYPE STATE CONNECTION eth0 ethernet connected Wired connection 1 lo loopback unmanaged --
  • You can also check the interface name using the ip command:
    sudo ip a 
    

    Configure Static IPv4 Address using Netplan on Ubuntu
    Checking the network interface name

The above output shows that the system is configured with the network interface name eth0. This can be different on your system. So please verify the system network interface name with the ip a command as shown above.

Configuring the Static IP Address using Netplan

Netplan stores all the configuration files under /etc/netplan directory. As you already have the network interface name found in the above commands. Now, we will configure the static IP address to that interface using the NetPlan utility.

Let’s, create a configuration file and edit it in your favorite text editor:

sudo vi /etc/netplan/01-netcfg.yaml 

Add the network configuration in YAML format. The below configuration uses 4 spaces due to strict indentation followed by the YAML.

network:
    version: 2
    renderer: networkd
    ethernets:
        eth0:
            addresses:
                - 192.168.0.210/24
            nameservers:
                addresses: [8.8.8.8, 8.8.4.4]
            routes:
                - to: default
                  via: 192.168.0.254

In the above configuration:

  • eth0 – is the network interface name
  • 192.168.0.210/24 – is the IPv4 address to set on interface. Make sure to define CIDR. You can add multiple IP address as well.
  • routes via 192.168.0.254 – Set the gateway IP address of the network
  • 8.8.8.8, 8.8.4.4 – is the IP address of the Google DNS servers.

Make sure the IPv4 address belongs to the system network and has the correct gateway Ip address.

Once confirmed, press ESC and :wq to save file content and close it.

Now, execute the following command to apply the changes:

sudo netplan apply 

This will configure the static IPv4 address on the network interface. Now the system will be accessible with the new IP address you configured above.

Conclusion

In this tutorial, you have learned to configure the network interface on Ubuntu systems.

The post Configuring the Static IPv4 Address on Ubuntu using Netplan appeared first on TecAdmin.

]]>
https://tecadmin.net/setup-static-ip-address-on-ubuntu-using-netplan/feed/ 0
How to Check IPv4 Address on Ubuntu 22.04 https://tecadmin.net/how-to-find-ipv4-address-on-ubuntu-22-04/ https://tecadmin.net/how-to-find-ipv4-address-on-ubuntu-22-04/#respond Sat, 30 Apr 2022 02:58:17 +0000 https://tecadmin.net/?p=29210 Question – How to find static IP Address of My Ubuntu Desktop system? 2 Ways to find IP Address on Ubuntu 22.04 Desktop and server editions? Ubuntu 22.04 desktop edition comes with an attractive Gnome Desktop Environment. You can either use the command prompt to check the current IP address on your system or use [...]

The post How to Check IPv4 Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
Question – How to find static IP Address of My Ubuntu Desktop system? 2 Ways to find IP Address on Ubuntu 22.04 Desktop and server editions?

Ubuntu 22.04 desktop edition comes with an attractive Gnome Desktop Environment. You can either use the command prompt to check the current IP address on your system or use a GUI option to view the local IP address on your system.

You can also use another article to change IP address on Ubuntu 22.04 desktop and server editions.

Choose one of the below methods to check the current IP address on a Ubuntu system.

Method 1: Checking IP Address via Command Line on Ubuntu 22.04

The Ubuntu desktop users Press CTRL+ALT+T to open the terminal and the server user connects to the system over SSH.

Once you get the terminal access, execute the ip addr show or its short version ip a command to view all the configured IPv3 addresses on network intefaces.

ip a 

You will see all the assigned ipv4 addresses on network interfaces.

How to Check IP Address in Ubuntu 22.04 Command Line
List All IPv4 Address using Command Line

The above output shows that the 192.168.1.212 IP with 24 netmark is configured on the system

Method 2: Checking IP Address in Ubuntu 22.04 Desktop

To follow this method, you must have a desktop environment on your Ubuntu system. Now,

  1. Log in to the Ubuntu desktop system and open settings as shown on the below screen.

    How to View IP Address in Ubuntu 22.04
    Open Settings in Your System
  2. In the left sidebar click on the Network tab. After that click icon to open the setting for your systems network interface as shown on the below screen.

    How to Check IP Address in Ubuntu 22.04
    Open Network Settings
  3. A new dialog box will appear with the details of all IPv4 addresses configured on the network interfaces.

    How to Check IP Address in Ubuntu 22.04
    All Configured IPv4 Address Listed Here

Wrap Up

In this tutorial, you have learned to find the currently configured IP address on a Ubuntu system. Hope this tutorial provides you with the right instruction and is helpful for you.

The post How to Check IPv4 Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-find-ipv4-address-on-ubuntu-22-04/feed/ 0
How to Configure Static IP Address on Ubuntu 22.04 https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/ https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/#comments Thu, 28 Apr 2022 17:44:55 +0000 https://tecadmin.net/?p=29160 After installing Ubuntu 22.04 the default network interface assigns an IP address using the DHCP server. Also, the wireless network will be active and enable networking over the wifi network. You can also configure the network interface with static IPv4 addresses. Ubuntu 22.04 uses the Netplan as a network manager. This tutorial helps you to [...]

The post How to Configure Static IP Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
After installing Ubuntu 22.04 the default network interface assigns an IP address using the DHCP server. Also, the wireless network will be active and enable networking over the wifi network.

You can also configure the network interface with static IPv4 addresses. Ubuntu 22.04 uses the Netplan as a network manager.

This tutorial helps you to configure network interfaces on Ubuntu 22.04 Desktop and Ubuntu 22.04 Server editions. The desktop users can use any one of the below methods but the server users that have CLI only access use the second method to edit network interface configuration files.

Method 1: Configuring Static IPv4 Address on Ubuntu 22.04 Desktop

The Ubuntu Desktop editions have a graphical interface for configuring the network interfaces. Follow the below steps to configure a static IP address on Ubuntu 22.04 Desktop system.

    • Click the network icon in the upper-right corner.
    • Then expand the Wired Connected dropdown.
    • Now, click on Wired Setting as shown below image.

    Configuring Static IP on Ubuntu 22.04
    Edit Wired Interface Settings
    • A network settings dialog box will appear.
    • Now, click “Network” in left sidebar.
    • Under the Wired section, click the Gear icon as showing in below image

    Configuring Static IP on Ubuntu 22.04
    Edit Network Interface
    • A new Wired dialog box will appear.
    • Now, click on “IPv4” tab.
    • Set IPv4 Method to Manual
    • Input a valid IP address, Netmark and Gateway address
    • Set the DNS server (optional)
    • Click Apply button to save changes

    Configuring Static IP on Ubuntu 22.04
    Configuring Static IP on Ubuntu
  1. Finally disable and then again enable networking to apply changes.

    Configure Static IP Address on Ubuntu 22.04
    Disable and Enable Networking
  2. All done. Ubuntu Desktop system IP address is now changed.

Method 2: Configuring Static IPv4 Address on Ubuntu 22.04 Server with CLI

Server editions are installed without any graphical interface. In that case, you need to configure the IP address using the command line.

Ubuntu uses the Netplan as a network manager that is responsible for configuring the network interfaces. Follow the below steps:

  1. First, find out the network interface name in your system. The interface name can differ based on the installation type and system hardware. To find the interface name type:
    sudo ip a 
    
    Configure Static IPv4 Address using Netplan on Ubuntu
    Checking the network interface name

    The above output shows that the system is configured with the network interface name eth0. This can be different on your system.

  2. Now, create or edit the network configuration file under the /etc/netplan directory. Create a configuration file and edit it in an editor:
    sudo vi /etc/netplan/01-netcfg.yaml 
    

    Add the network configuration in YAML format as below:

    network:
        version: 2
        renderer: networkd
        ethernets:
            eth0:
                addresses:
                    - 192.168.1.212/24
                nameservers:
                    addresses: [8.8.8.8, 8.8.4.4]
                routes:
                    - to: default
                      via: 192.168.1.2

    In the above configuration:

    • eth0 – is the network interface name
    • addresses – is used to configure IPv4 address on an interface. Make sure to define CIDR. You can add multiple addresses here
    • nameservers – Set the name servers here. 8.8.8.8 and 8.8.4.4 are Google’s name servers
    • routes – This is used to set gateway on your system.

    Make sure the IPv4 address belongs to the system network and has the correct gateway Ip address. Once confirmed, save file content and close it.

  3. Apply the changes by running the following commands.Now, execute the following command to apply the changes:
    sudo netplan apply 
    

    That’s it. The static IP address is configured on your Ubuntu system.

Conclusion

In this tutorial, you have learned 2 methods of configuring network interface on Ubuntu 22.04 systems. The first method uses the GUI interface to set up a static IP address. The second method provides you with the instructions to configure the network interface via the command line using Netplan.

You can also configure multiple IP addresses on a single network interface.

The post How to Configure Static IP Address on Ubuntu 22.04 appeared first on TecAdmin.

]]>
https://tecadmin.net/how-to-configure-static-ip-address-on-ubuntu-22-04/feed/ 10
Linux ip Command and Examples https://tecadmin.net/linux-ip-command/ https://tecadmin.net/linux-ip-command/#respond Wed, 14 Jul 2021 09:12:52 +0000 https://tecadmin.net/?p=26719 Linux ip command is a command-line utility used for show/update ip address, kernel routing tables, network devices, interfaces, and tunnels. This command is a part of iproute2 package. With the help of ip command, the system administrators assign an address to a network interface and/or configure network parameters on an interface. IP (Internet Protocol) address [...]

The post Linux ip Command and Examples appeared first on TecAdmin.

]]>
Linux ip command is a command-line utility used for show/update ip address, kernel routing tables, network devices, interfaces, and tunnels. This command is a part of iproute2 package. With the help of ip command, the system administrators assign an address to a network interface and/or configure network parameters on an interface.

IP (Internet Protocol) address is a numerical label assigned to a network interface of a computer that allows the communication of the system over the internet. On a computer network, a system communicates with another system by its IP address.

The older operating systems were uses the ifconfig. Which was also a powerful command, is deprecated on newer Linux systems, and replaced by the ip command. But, You can also use the ifconfig command on modern OS/Distros by installing net-tools package..

In this tutorial, you will learn about the uses of the Linux ip command with useful examples.

How to Use ip Command

The modern Linux systems provide iproute2 package, which replaces the various commands provided by the net-tools package. Also, the ip command comes under this packages, with great features.

Syntax:

The ip command uses the following syntax:

ip [ OPTIONS ] OBJECT { COMMAND | help }

Remember that configurations created with this command like IP addresses, routes, and policy routing rules (and so on) are not persistent. Make changes permanently, you need to edit the appropriate configuration to your platform/OS.

Get Help

Just type “help” after the ip command to view commands uses details.

ip help 
Output:
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] -batch filename where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila | vrf | sr | nexthop } OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | -h[uman-readable] | -iec | -j[son] | -p[retty] | -f[amily] { inet | inet6 | mpls | bridge | link } | -4 | -6 | -I | -D | -M | -B | -0 | -l[oops] { maximum-addr-flush-attempts } | -br[ief] | -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] | -c[olor]}

In addition, use the help command to get object specific help, like:

ip addr help 

Similarly, try below command to get help for route object subcommand.

ip route help 

Try the help command with other objects to get help.

Next, you will learn about the uses of the ip command. For the learning purpose, use a system physically accessible. In other words, any wrong command may down the network interface and you may disconnect from the remote systems. But, the physical system still be accessible.

View and Manage Network Interfaces

Use link subcommand with ip command to manage and display the state of all network interfaces. The Name of the network interfaces may differ based on the Linux distributions and hardware platforms etc.

  1. View all available network interfaces

    The ip link default command shows the details of all interfaces.

    ip link 
    [OR]
    ip link show 
    
    Output:
    1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 6e:dc:96:05:82:a8 brd ff:ff:ff:ff:ff:ff
  2. View specific network interfaces

    Define the network interface name to view information about the specific one.

    ip link show eth0
    
    Output:
    2: eth0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 6e:dc:96:05:82:a8 brd ff:ff:ff:ff:ff:ff
  3. View statics of a network interface

    Use -s option to view the network interface statics. It shows all details about the packet and data sent and receive on that interface.

    ip -s link show eth0
    
    Output:
    2: eth0: mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000 link/ether 6e:dc:96:05:82:a8 brd ff:ff:ff:ff:ff:ff RX: bytes packets errors dropped overrun mcast 5746680521 36516527 0 0 0 0 TX: bytes packets errors dropped carrier collsns 33339856329 33119340 0 0 0 0

    Remove the interface name (eth0) to view statics for all the available network interfaces.

  4. Bring UP and Down Network Interfaces

    Use the ip link set command to alter the network interface state. Here up is used to bring the network interface online.

    ip link set eth0 up
    

    Use down option to bring the network interface offline

    ip link set eth0 down
    

    Note: While working with remote systems, don’t bring down the interface. It may disconnect your system from the network.

Display and Add IP Address on Network Interfaces

The ip addr subcommand is used for displaying the IP address configured on network interfaces. You can also use the same command to set an IP address on a network interface.

  1. Display IP Address of all interfaces

    The default ip addr subcommand shows the IP addresses details on all interfaces. You can also include show is optional, while viewing the IP details of all network interface.

    ip addr 
    [OR]
    ip addr show 
    
    Output:
    1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 6e:dc:96:05:82:a8 brd ff:ff:ff:ff:ff:ff inet 192.168.10.110/24 brd 192.168.10.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::6cdc:96ff:fe05:82a8/64 scope link valid_lft forever preferred_lft forever

    You can also display only IPv4 or IPv6 ip addresses by using ip -4 addr or ip -6 addr commands.

  2. Display IP address of a single interface:

    Specify the interface name with ip addr show subcommand to display IP address of a specific interface.

    For example, view the IP address on eth0 network interface:

    ip addr show dev eth0
    
    Output:
    2: eth0: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 6e:dc:96:05:82:a8 brd ff:ff:ff:ff:ff:ff inet 192.168.10.110/24 brd 192.168.10.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::6cdc:96ff:fe05:82a8/64 scope link valid_lft forever preferred_lft forever
  3. Assing IP address of an interface:

    The ip addr add subcommand is used to add an address on a network interface. The below command will assign ip address 192.168.10.100 with netmask 24 on eth0 network interface.

    ip addr add 192.168.10.100/24 dev eth0
    
  4. Assing multiple IP address of an interface:

    In addition, you can assign more IP address to a single interface. Use same command as abvoe to assign multiple IP address on the single network interface. For example:

    ip addr add 192.168.10.100/24 dev eth0
    ip addr add 192.168.10.105/24 dev eth0
    
  5. Remove IP address from interface:

    If you think, that an IP address is no more required or adding by mistake can be removed from the interface. Use the ip addr del subcommand to delete an IP address from any network interface.

    For example, use the following command to remove IP address 192.168.10.105 with 24 subnet mask from eth0 interface

    ip addr del 192.168.10.105/24 dev eth0
    

Display and Alter the Routing Table

The ip command also provides you the option to view or change the routing table of any network interface.

Use ip route subcommand to work with the routing tables.

  1. List kernel routing table

    By default ip route command lists all the routing entries in the kernel. You can also prefix show option to view the same results.

    ip route 
    
    Output:
    default via 192.168.10.1 dev eth0 proto static 192.168.10.0/24 dev eth0 proto kernel scope link src 192.168.10.1

    The above results show that 192.168.10.1 is the default gateway used by the kernel via the eth0 network interface.

  2. Add an entry to the routing table

    • Add a default route (for all addresses) via the local gateway 192.168.10.1 that can be reached on device eth0
      ip route add default via 192.168.10.1 dev eth0 
      
    • Add a route to 192.168.10.0/24 via the gateway at 192.168.10.1
      ip route add 192.168.10.0/24 via 192.168.10.1 
      
    • Add a route to 192.168.10.0/24 that can be reached on device eth0
      ip route add 192.168.10.0/24 dev eth0 
      
  3. Delete a routing table entry

    Use the following command to delete the route for 192.168.10.0/24 via the gateway at 192.168.10.1

    ip route delete 192.168.10.0/24 via 192.168.10.1 
    
  4. Replace, or add if not defined, a route

    Replace an exiting route defined for 192.168.10.0/24 to use device eth0

    ip route replace 192.168.10.0/24 dev em1 
    
  5. Display the route an address will take

    This command is very useful during the troubleshooting of the network. In other words, you can find the route used by the system to reach a defined destination IP address.

    ip route get 8.8.8.8 
    
    Output:
    8.8.8.8 via 192.168.10.1 dev eth0 src 192.168.10.108 uid 0

Conclusion

In conclusion, you have learned about Linux ip command with useful examples. Here we describe, how to manage a network interface on Linux systems. Adding or deleting the kernel routing table entries. Make a network interface UP (online) and down (offline). Adding, remove or display the IP addresses on a network interface.

The post Linux ip Command and Examples appeared first on TecAdmin.

]]>
https://tecadmin.net/linux-ip-command/feed/ 0
How to Configure Static IP Address on CentOS 8 https://tecadmin.net/configure-static-ip-address-centos8/ https://tecadmin.net/configure-static-ip-address-centos8/#respond Wed, 02 Oct 2019 16:40:21 +0000 https://tecadmin.net/?p=19404 Question – How to change or configure an IP address on CentOS 8? Steps to set the static IP address on your CentOS Desktop system As of today, The CentOS 8 Linux operating system is the latest available version of CentOS. The desktop provides an attractive GUI for working with it. You can easily change [...]

The post How to Configure Static IP Address on CentOS 8 appeared first on TecAdmin.

]]>
Question – How to change or configure an IP address on CentOS 8? Steps to set the static IP address on your CentOS Desktop system

As of today, The CentOS 8 Linux operating system is the latest available version of CentOS. The desktop provides an attractive GUI for working with it. You can easily change or set a static IP address on your Desktop system.

Step 1 – Open Network Settings

Login to your CentOS 8 Desktop system. After that open settings windows on your CentOS Desktop machine as showing in the below screen.

CentOS 8 open settings

In the left sidebar click on the Network tab. After that click icon to open setting for your systems network interface as shown in the below screen.

CentOS 8 network settings

This window will show you the current IP address configured on your system. Now select the IPv4 tab.

Step 2 – Setup Static IP on CentOS 8

Under the IPv4 Method select the “Manual” option.

Now go to the Addresses section and set your IP Address, Netmask, and Gateway.

CentOS 8 change IP

You can also set remote DNS IP addresses. If you don’t know what to set here use 8.8.8.8 and 8.8.4.4 as shown in the above screenshot.

Then click the Apply button to save changes.

Step 3 – View Current IPs

Open a terminal on your CentOS 8 Linux system. Now type following IP command to view all IP addresses configured on your system.

ip addr show

In case the new IP is not showing, simply enable/disable networking on your system and check IP again.

CentOS 8 enable disable networking

The post How to Configure Static IP Address on CentOS 8 appeared first on TecAdmin.

]]>
https://tecadmin.net/configure-static-ip-address-centos8/feed/ 0
How to Disable IPv6 on Linux https://tecadmin.net/disable-ipv6-on-linux/ https://tecadmin.net/disable-ipv6-on-linux/#comments Mon, 04 Jan 2016 17:12:08 +0000 https://tecadmin.net/?p=9543 IPv6 is the next-generation internet protocol, designed to replace the current Internet Protocol, IP Version 4. IP addresses are required for communication between two devices. It is an identity of a computer over Internet. This article will help you to disable IPv6 from your Linux box. 1. Check IPv6 Address Use ifconfig command to view [...]

The post How to Disable IPv6 on Linux appeared first on TecAdmin.

]]>
IPv6 is the next-generation internet protocol, designed to replace the current Internet Protocol, IP Version 4. IP addresses are required for communication between two devices. It is an identity of a computer over Internet.

This article will help you to disable IPv6 from your Linux box.

1. Check IPv6 Address

Use ifconfig command to view current IPv6 address on your system. You will get results something like below.

[root@tecadmin ~]# ifconfig 

eth0: flags=4163  mtu 1500
        inet 45.55.65.94  netmask 255.255.224.0  broadcast 45.55.95.255
        inet6 fe80::601:92ff:fe35:ea01  prefixlen 64  scopeid 0x20<link>
        ether 04:01:92:35:ea:01  txqueuelen 1000  (Ethernet)
        RX packets 2411381  bytes 794420295 (757.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2151232  bytes 351005391 (334.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163  mtu 1500
        inet6 fe80::601:92ff:fe35:ea02  prefixlen 64  scopeid 0x20<link>
        ether 04:01:92:35:ea:02  txqueuelen 1000  (Ethernet)
        RX packets 8  bytes 648 (648.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 123828  bytes 21997128 (20.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 47584  bytes 4822673 (4.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47584  bytes 4822673 (4.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

2. Disable IPv6 Temporarily

If to disable IPv6 for your current session, Simply use following command to set run time variable. Remember that below change will be discards after system reboot.

$ sudo echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6

3. Disable IPv6 Permanent

To disable IPv6 permanently, edit /etc/sysctl.conf file and add/update following parameters

$ vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

and reload sysctl configuration using following command

$ sudo sysctl -p

The post How to Disable IPv6 on Linux appeared first on TecAdmin.

]]>
https://tecadmin.net/disable-ipv6-on-linux/feed/ 1
How to Set Up LogMeIn (Hamachi) VPN on Ubuntu 16.04, CentOS/RHEL 7 https://tecadmin.net/set-up-logmein-on-linux/ https://tecadmin.net/set-up-logmein-on-linux/#comments Sun, 16 Mar 2014 09:51:19 +0000 https://tecadmin.net/?p=1752 Hamachi is used or setup VPN and connect systems over VPN network. This provides an quick and easier way to create VPN network and attach system. You can create a free account on logmein.com and create networks. You can add up to 5 systems in each network with free account. To add more than 5 [...]

The post How to Set Up LogMeIn (Hamachi) VPN on Ubuntu 16.04, CentOS/RHEL 7 appeared first on TecAdmin.

]]>
Hamachi is used or setup VPN and connect systems over VPN network. This provides an quick and easier way to create VPN network and attach system. You can create a free account on logmein.com and create networks. You can add up to 5 systems in each network with free account. To add more than 5 systems required to upgrade network to paid version.

For this tutorial, I have already created hamachi network from its web interface and get a network id and connected a windows system with this network. This tutorial will help you set up LogMeIn VPN network and add Linux machines to this network. Also, attach a Windows system to communicate each host over VPN.

    Network ID: 181-585-285
    Windows Client IP: 25.70.100.134
    Linux Client IP: Will get after Install

Step 1 – Install Required Packages

For installing hamachi on CentOS, RedHat systems, you must have installed redhat-lsb package. If you don’t have already install it using the following command.

sudo yum install redhat-lsb

Step 2 – Download LogMeIn and Install

Visit LogMeIn official download webpage to download latest LogMeIn-hamachi packages for your Debian, Redhat or Windows systems. You may also use the below commands to install LogMeIn hamachi client on your system.

CentOS/RHEL 7:-

wget https://www.vpn.net/installers/logmein-hamachi-2.1.0.174-1.x86_64.rpm
sudo rpm -ivh logmein-hamachi-2.1.0.174-1.x86_64.rpm

Ubuntu 16:-

wget https://www.vpn.net/installers/logmein-hamachi_2.1.0.174-1_amd64.deb
sudo dpkg -i logmein-hamachi_2.1.0.174-1_amd64.deb

Start Hamachi service using the following command.

sudo /etc/init.d/logmein-hamachi start

Step 3 – Set Up LogMeIn Network

You can also create the network using the command line. But I prefer to login to the LogMeIn hamachi dashboard and create a Network under Networks >> My Networks section. For security, purpose assigns a password for your network. On creation of the network, you will get a network id. Use this network id and password to attach remote systems to this network.

Set Up LogMeIn Hamachi Network

Step 4 – Join LogMeIn Existing Network

After installing hamachi, let’s join existing network. But it required being logged in first. There is no need for any login credentials for it, just use the following command.

hamachi login

Logging in .......... ok

Now use the command to join the network. 181-585-285 is the LogMeIn-Hamachi network id.

hamachi join 181-585-285

Password:
Joining 181-585-285 .. ok

Now you have successfully joined to existing network.

Step 5 – Check Hamachi Status and Details

To check the IP address, hamachi client id and other details about your system just type command ‘hamachi‘ and press enter.

hamachi

version : 2.1.0.174
pid : 20578
status : logged in
client id : 219-270-114
address : 25.71.188.76 2620:9b::1947:bc4c
nickname : svr1.tecadmin.net
lmi account: -

To check the current joined to network and other details about that network just use the following command

hamachi list

Let’s try to ping to windows client.

ping 25.70.100.134 -c 4

PING 25.70.100.134 (25.70.100.134) 56(84) bytes of data.
64 bytes from 25.70.100.134: icmp_seq=1 ttl=128 time=1.88 ms
64 bytes from 25.70.100.134: icmp_seq=2 ttl=128 time=2.15 ms
64 bytes from 25.70.100.134: icmp_seq=3 ttl=128 time=1.56 ms
64 bytes from 25.70.100.134: icmp_seq=4 ttl=128 time=1.63 ms

--- 25.70.100.134 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3010ms
rtt min/avg/max/mdev = 1.563/1.806/2.150/0.237 ms

The above output showing that system is successfully communicating with windows client using hamachi network.

Set Up LogMeIn Hamachi

Congratulation’s! You have successfully installed and configured LogMeIn Hamachi on your Linux system.

The post How to Set Up LogMeIn (Hamachi) VPN on Ubuntu 16.04, CentOS/RHEL 7 appeared first on TecAdmin.

]]>
https://tecadmin.net/set-up-logmein-on-linux/feed/ 12