kali双网卡
迪丽瓦拉
2024-06-01 05:58:21
0

先单独开启一个网卡,配置/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 static
address 192.168.40.165
netmask 255.255.255.0

auto eth1
iface eth1 inet static
address 10.251.5.130
netmask 255.255.255.0
gateway 10.251.5.254

保存之后重启网络 service networking restart

添加路由 route add -net 192.200.41.0/24 gw 192.168.40.254 dev eth0

192.200.41.0/24 为需要访问内网的网段,添加网关为内网网卡的网关。

现在可以在内网访问此主。
参考:https://blog.csdn.net/Blog_inG/article/details/89351758

相关内容