Herramientas de usuario

Herramientas del sitio


wiki2:linux-networking-tools

¡Esta es una revisión vieja del documento!


Networking tools in Linux

Basic

  • ip a to see interfaces + ip addresses.
  • ifw disable disables the ubuntu firewall.

iptables

netplan

To change the network configuration in new Ubuntu versions.

There is an .yml software in /etc/netplan. To apply changes use the next command:

netplan apply

Change IP

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
        - 10.10.10.2/24
      gateway4: 10.10.10.1
      nameservers:
          search: [mydomain, otherdomain]
          addresses: [10.10.10.1, 1.1.1.1]

DHCP example

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: true

Using NetworkManager

network:
  version: 2
  renderer: NetworkManager

routes

DNS

VPN with strongswan

ipsec command

  • ipsec status tells you who is connected.
  • ipsec reload reloads the config.
  • ipsec restart restarts the service.

Troubleshooting

Mapping the network

Which ports are open?

Locally and simply:

nmap localhost

Remotely:

nmap -Pn -p 51414 95.169.230.182

Comprueba el puerto 51414 de 95.169.230.182.

Hay la posibilidad de lanzarlo via web desde: http://nmap.online-domain-tools.com/

Discover IP's

nmap -sP 192.168.1.*
nmap -sn 192.168.1.0/24

How to...

Update DNS in Ubuntu 18.04

Previously you only need to edit the /etc/resolv.conf

In new versions Netplan manages the network. You can configure it on files places on /etc/netplan; these have an yml format.

This is an example:

network:
  version: 2
  renderer: networkd
  ethernets:
    ens3:
      dhcp4: no
      addresses:
        - 192.168.121.199/24
      gateway4: 192.168.121.1
      nameservers:
          addresses: [8.8.8.8, 8.8.4.4]

To update from changes do:

netplan apply

To list dns entries:

systemd-resolve --status
wiki2/linux-networking-tools.1589012709.txt.gz · Última modificación: 2020/05/09 09:25 (editor externo)