zoukankan      html  css  js  c++  java
  • 00-04.kaliLinux-手动配置IP地址

    在KaliLinux中手动配置网卡

    用vim打开网卡的配置文件,配置各个网卡信息

    root@kali:~# cd /etc/network
    root@kali:/etc/network# 
    --------------------------------------------------------------------
    root@kali:/etc/network# ls
    if-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces.d
    root@kali:/etc/network# 
    --------------------------------------------------------------------
    root@kali:/etc/network# vim interfaces
    --------------------------------------------------------------------
    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    #添加以下信息
    auto eth0 
    iface eth0 inet static
    address 192.168.4.36
    netmask 255.255.255.0
    gateway 192.168.4.1
    
    auto eth1 
    iface eth1 inet static
    address 192.168.23.200
    netmask 255.255.255.0
    ~
    -----------------------------------------------------------------------
    :wq

    配置DNS相关信息

    root@kali:/etc/network# vim /etc/resolv.conf
    -------------------------------------------------------------------
    ~
    nameserver 114.114.114.114 
    nameserver 192.168.4.1 
    ~
    -------------------------------------------------------------------
    :wq

    最后一定要重启网卡服务

    root@kali:/etc/network# service networking restart
    root@kali:/etc/network#
  • 相关阅读:
    正向代理和反向代理
    python的reduce,map,zip,filter和sorted函数
    sed和awk的简单使用
    nginx+uWSGI+django+virtualenv+supervisor发布web服务器
    nginx负载均衡
    nginx入门与实战
    python开发之virtualenv与virtualenvwrapper讲解
    Linux下的python3,virtualenv,Mysql、nginx、redis安装配置
    Linux系统基础优化及常用命令
    vim与程序员
  • 原文地址:https://www.cnblogs.com/xiaobaishy/p/13031131.html
Copyright © 2011-2022 走看看