Network

    ifconfig (obsolete)

    deprecated: now replaced by ìp command

    Attribute static ip, for example 192.168.1.102/24 on eth0:

    ifconfig eth0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.255
    

    Note: there is not gateway

    DNS

    /etc/resolv.conf:

    ; google dns server
    nameserver 8.8.8.8
    
    ; ovh dns server
    nameserver 213.186.33.99
    

    Open ports

    List current open ports

    ss -ntlp | grep LISTEN
    

    NOTE: previously named netstat instead of ss

    Disable ip v6

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

    Show interfaces

    ip -c link show
    

    Set up static ip adress

    config file

    /etc/network/interfaces:

    iface enp0s31f6 inet static
      address 192.168.1.2
      netmask 255.255.255.0
      gateway 192.168.1.1
    

    Note: ensure that allow-hotplug enpXX is commented and that iface enpXX inet dhcp is static and not dhcp.

    cli

    ip address add 192.168.1.2/24 dev enp0s31f6
    ip route add default via 192.168.1.1
    

    Notes:

    • replace enp0s31f6 by the correct interface
    • when finished you can remove with del instead of add

    Test bandwidth

    package iperf available on debian

    server: iperf -s client: iperf -c 192.168.1.10