Teología 101

Porque no es tan difícil...

Herramientas de usuario

Herramientas del sitio


configs

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anteriorRevisión previa
Próxima revisión
Revisión previa
configs [2020/04/16 16:00] – [ip command] gregkedroconfigs [2020/04/17 16:49] (actual) gregkedro
Línea 368: Línea 368:
 **Debian Method** (as root): **Debian Method** (as root):
 <code> <code>
-/etc/init.d/networking restart Restart network interface, or stop/start...  +/etc/init.d/networking restart Restarts network interfaces, or stop/start...  
-/etc/init.d/networking stop     # Stops network interface +/etc/init.d/networking stop     # Stops network interfaces 
-/etc/init.d/networking start    # Starts network interface+/etc/init.d/networking start    # Starts network interfaces
  
 systemctl restart networking    # For those with lovely systemd systemctl restart networking    # For those with lovely systemd
 systemctl status network        # See status of network systemd systemctl status network        # See status of network systemd
 </code> </code>
 +
 +===== ifupdown vs. ifconfig =====
 +
 +**Debian, overview:**
 +  * ''ifup'' and ''ifdown'' control interfaces that are listed in ''/etc/network/interfaces''.
 +  * ''ifconfig'' directly controls network interfaces (much like the newer ''ip'' command)
 +
 +**The** ''ifupdown'' **package:** high-level network configuration
 +  * The ''ifup'' and ''ifdown'' commands may be used to configure or deconfigure network interfaces based on interface definitions in the file ''/etc/network/interfaces''.
 +  * Example: bring up the network with ''ifup eth0'' based on eth0 configuration in ''/etc/network/interfaces''.
 +  * ''ifupdown'' will wrap ''ifconfig'' with the network configuration files (i.e., ''ifdown'' or ''ifup'' will execute ''ifconfig down'' or ''ifconfig up'' inside it). That means: 
 +    * ''ifup eth0'' will fetch the interface config file and bring up the interface with the correct IP address, mask, routes etc. 
 +    * ''ifconfig eth0'' up would just start the interface **//with no IP//**, etc. (important for sniffing in monitor mode because you don't want an IP address, etc.; you want an open broadcase).
 +
 +**The** ''ifconfig'' **command:** a low-level network command (and deprecated, sadly)
 +  * An ''ifconfig up eth0'' activates eth0 but does not setup IP addresses, etc.
 +  * An ''ifup eth0'' sets up IP addresses and other options based on the interface's configuration in ''/etc/network/interfaces''.
  
 ===== ip command ===== ===== ip command =====
Línea 380: Línea 397:
 **Usage of the** ''ip'' **command:** **Usage of the** ''ip'' **command:**
   * If your distro did not install ifconfig, you can install it in Debian with ''apt install net-tools''.   * If your distro did not install ifconfig, you can install it in Debian with ''apt install net-tools''.
-  * Or you can use the horridly ugly syntax for ''ip'' (complex and hard-to-understand help can be found [[https://www.howtogeek.com/657911/how-to-use-the-ip-command-on-linux/|here]]).+  * Or you can use the horridly ugly syntax for ''ip'' (complex and hard-to-understand help can be found [[https://www.howtogeek.com/657911/how-to-use-the-ip-command-on-linux/|here]] or an easier-to-understand explanation [[https://www.tecmint.com/ip-command-examples/|here]]).
   * From the following example you will need to replace the IP and the interface with your own.   * From the following example you will need to replace the IP and the interface with your own.
  
Línea 399: Línea 416:
 </code> </code>
  
-Note: This will only set up your network for your current work session. You'll lose it on reboot.+**Note on Persistence:** This will only set up your network for your current work session. You'll lose it on reboot
 +  * ''ip'' (like the old net-tools ''ifconfig'' stuff) interacts with ''/etc/network/interfaces'', so put all your network configuration information there and just up/down your network with these commands:  
 + 
 +<code> 
 +/etc/init.d/networking restart  # Restarts network interfaces, or stop/start...  
 +/etc/init.d/networking stop     # Stops network interfaces 
 +/etc/init.d/networking start    # Starts network interfaces 
 +</code> 
 + 
 +---- 
 + 
 +======= Kali: root ======= 
 + 
 +Kali made the spectacular decision to [[https://www.kali.org/news/kali-default-non-root-user/|drop the default root policy]] and then not even allow you to configure a root password (i.e., log in as root) when you install. 
 +  * When you install Kali Linux, you’ll be asked to create non-root user that will have admin privileges. Tools and commands that require root access will be run with sudo. 
 +  * So you have to type sudu... sudo... sudo... sudo... (really, guys??). 
 + 
 +To configure password-less root rights for your normal user (but you still have no access to applications that are only in root's PATH):  
 + 
 +<code> 
 +sudo apt install kali-grant-root 
 +sudo dpkg-reconfigure kali-grant-root 
 +</code> 
 + 
 +Better: Unlock the root login. Just give root a password, log out, then log in as root: 
 + 
 +<code> 
 +sudo su -  # do this as a normal user, give your password; you become root 
 +passwd     # add a password to root's account; log out, log in, shiny 
 +</code> 
 + 
 +Ah... happiness again in the land of hacker [[https://www.kansascityzoo.org/ouranimals/list-of-animals/king-penguin/|penguins]]..
  
 ---- ----
configs.1587052830.txt.gz · Última modificación: 2020/04/16 16:00 por gregkedro