Comandos de red en Ubuntu/Debian

1.       ifconfig   //Este comando solo muestra las interfaces que están funcionando o “arriba”. Con este comando vemos la IP local de la máquina en la LAN.

2.       ifconfig -a  //Muestra todas las interfaces de red, habilitadas o deshabilitadas.

3.       Ifconfig [nombreinterfazDeRed]    [IP]   netmask   [máscaraDeRed]  //Con este comando ponemos IP y Mácara a nuestra máquina.

  • 1ª Forma ifconfig eth1 10.33.1.2 netmask 255.255.255.0
  • 2ª Forma ifconfig eth1 10.33.1.2/24

4.       cat /etc/network/interfaces  // Configuración de las tarjetas de red y sus direcciones IP asignadas.

5.       /etc/init.d/networking restart  //reinicia el servicio de red.

6.       /etc/init.d/networking stop  // Para el servicio de red.

7.       /etc/init.d/networking start  //Inicia el servicio de red.

8.       ifconfig eth0 up/down //habilita o deshabilita la interfaz de red eth0.

9.       Ver IP de la puerta de enlace

netstat –nr

               route –n   //muestra la tabla de enrutamiento

nslookup 127.0.0.1

10.   Para DNS

sudo apt-get update && apt-get install dnsutils

cat /etc/resolv.conf   // Vemos direccciones IP de los servidores DNS asignados a la máquina

cat /etc/hosts  //Vemos el contenido del archivo hosts

11.   curl ip.appspot.com   //Vemos la IP pública

 

Ejemplo cambiar IP Linux desde la consola

Podemos cambiar la interfaz de red temporal o permanentemente.

Si necesitáis reiniciar las interfaces de red:

sudo/etc/init.d/networkingrestart

  • Temporal:

Paso 1. Configurar la IP

ifconfig eth0 10.33.1.2 netmask 255.255.255.0

Comprobar

ifconfig

Paso 2. Configurar GateWay

route add default gw 10.33.1.1

Comprobar

route -n

Paso 3. Configurar DNS

echonameserver 10.33.1.200 > /etc/resolv.conf

O editar el fichero y ponerlo a mano

  • Permanente:

Editamos /etc/network/interfaces

En primera instancia, agregaremos un # al inicio de la línea iface eth0 inet dhcp, de esta forma deshabilitamos la configuración automática por DHCP.

Ya tenemos todos los datos para configurar la IP, procedemos a agregarlos al archivo:

auto eth0

iface eth0 inet static

address 10.33.1.2

netmask 255.255.255.0

gateway 10.33.1.1

 

Deja un comentario

slot gacor

slot gacor

https://badudu.org/

badudu

slot gacor

https://siakad.unikamamuju.ac.id/fonts/-/starlight-princess/

slot88

slot gacor

https://ninjajago.sbs/

https://labskill.umtas.ac.id/wp-content/slot-gacor/

https://kamalinews.co.id/wp-content/slot-deposit-qris/

https://lsgi.org/

https://lsgi.org/

ninjajago

slot777

slot88

http://upforfifty.xyz/

slot gacor

slot gacor

slot88

slot

https://katalog.uinsyahada.ac.id/slot/

situs slot gacor 2023

slot gacor

slot

https://게이코슬롯.com/

gacor88

slot gacor

slot thailand

slot demo

slot gacor

slot gacor

https://siakad.poltekbangmedan.ac.id/images/

slot gacor

slot gacor 4d

slot gacor

situs slot gacor

slot gacor

situs slot gacor

https://setda.blorakab.go.id/packages/upload/galeri/

slot demo

rtp slot

slot gacor

slot88

slot gacor

https://plti.amikompurwokerto.ac.id/wp-content/pages/?tunnel=Slot%20Tongkat%20123

slot88

slot-gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot gacor

slot demo

slot88/

https://smartvillage.tubankab.go.id/vendor/

https://manajemen.unik-kediri.ac.id/wp-content/files/-/slot-toto/

https://myexist.muallimaat.sch.id/.well-known/

slot gacor

toto macau

slot gacor

slot gacor

slot gacor hari ini

slot-gacor

slot gacor

http://student.unisbank.ac.id/wp-includes/slot-gacor-hari-ini/

https://keclasem.rembangkab.go.id/error/

https://ak.polnep.ac.id/slot-gacor/

slot thailand

https://pmbtest.akpergshwng.ac.id/data/slot-qris-gacor/

slot gacor 4d

https://elsa.polteksahid.ac.id/elsa/files/slot-gacor-thailand/

https://ppdb.smai-soedirman-kotabekasi.sch.id/assets/

slot-gacor

slot-gacor

olxtoto

slot gacor

slot88

slot gacor

slot gacor

https://roadpowersystems.com/pages/

https://disdikbud.pemkomedan.go.id/assets/css/

slot4d

slot gacor

slot gacor

slot gacor

slot thailand

togel online

slot88

https://diafrica.org/pages/

togel online

slot gacor

https://fkomputer.umku.ac.id/wp-content/plugins/

slot gacor

slot gacor

slot gacor

https://feb.umku.ac.id/wp-includes/

https://fgizi.umku.ac.id/wp-content/languages/

https://fmipa.umku.ac.id/wp-includes/

slot gacor

slot88

slot88

slot gacor

slot gacor

slot gacor

slot gacor

https://fkip.umku.ac.id/wp-content/uploads/

https://fkesehatan.umku.ac.id/wp-content/plugins/

slot gacor

https://fst.umku.ac.id/wp-content/plugins/

https://fkeperawatan.umku.ac.id/wp-content/plugins/

olx toto

https://akparjakarta.ac.id/wp-content/

slot qris

slot qris

slot gacor

slot gacor

slot gopay

slot gacor

https://siakad.poltekbangmedan.ac.id/images/

slot thailand

slot gacor

slot gopay

https://ppdb.smai-soedirman-kotabekasi.sch.id/assets/

https://pmbtest.akpergshwng.ac.id/data/slot-qris-gacor/

https://cbt.dindikbud.pekalongankab.go.id/assets/

slot ovo

https://jdih.pn-labuanbajo.go.id/images/

https://pn-labuanbajo.go.id/wp-content/uploads/

https://fst.umku.ac.id/wp-content/uploads/

slot gacor

slot88

slot gacor

slot gacor

slot gacor

slot88

slot gacor

https://smkpelitanusantara.sch.id/

https://wibs.sch.id/

https://mnis.sch.id/

https://smkm3-alkamal.sch.id/

https://pelitanusantara.sch.id/

slot hoki

slot gacor kamboja

slot777

slot gacor 4d

http://esptpd.kaimanakab.go.id/public/img/

slot gacor

slot gacor

slot server luar

slot gacor

slot demo

slot88

slot hoki

https://api.kelastryout.id/assets/

https://siasuh.poltekbangmedan.ac.id/pedoman/ninjajago/

slot gacor

slot gacor

slot