zoukankan      html  css  js  c++  java
  • kali no eth0

    情况:没有ip地址,无法联网

    root@arnyeksec:~# ifconfig 
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 176  bytes 13944 (13.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 176  bytes 13944 (13.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    首先查看没启用的端口:

    root@arnyeksec:~# ifconfig -a
    eth0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
            ether 00:0c:29:6f:51:1e  txqueuelen 1000  (Ethernet)
            RX packets 33  bytes 4639 (4.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 63  bytes 5636 (5.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 19  base 0x2000  

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 176  bytes 13944 (13.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 176  bytes 13944 (13.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    发现eth0这个端口没有开启,先修改配置文件(添加后两行):

    root@arnyeksec:~# vim /etc/network/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 dhcp

    然后重启网卡:

    root@arnyeksec:~# /etc/init.d/networking restart 
    [ ok ] Restarting networking (via systemctl): networking.service.
    ————————————————
    版权声明:本文为CSDN博主「valecalida」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/valecalida/article/details/88569791

  • 相关阅读:
    移动端疫情展示
    第五周学习进度
    第四周学习进度
    结队开发-四则运算
    第三周学习进度
    全球疫情可视化第一阶段
    第二周学习进度
    面试题 02.07. 链表相交 做题小结
    剑指 Offer 35. 复杂链表的复制 做题小结
    LeetCode 452. 用最少数量的箭引爆气球 做题小结
  • 原文地址:https://www.cnblogs.com/p20050001/p/12560653.html
Copyright © 2011-2022 走看看