确认内核是否有tun模块

# modinfo tun

yum install tunctl -y

如果找不到

vim /etc/yum.repos.d/nux-misc.repo

[nux-misc]
name=Nux Misc
baseurl=http://li.nux.ro/download/nux/misc/el7/x86_64/
enabled=0
gpgcheck=1
gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

# yum --enablerepo=nux-misc install tunctl

---------------------------------------

tunctl -t tap0 -u root                        

tap0 是虚拟网卡名字

ifconfig tap0 172.168.1.1 netmask 255.255.255.0 promisc

172.168.1.1 是ip地址

 

查看

ifconfig tap0

 

相关文章:

  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2022-01-12
  • 2021-08-30
  • 2021-08-05
  • 2021-08-26
  • 2021-12-14
猜你喜欢
  • 2021-08-23
  • 2021-05-02
  • 2021-12-09
  • 2021-07-29
  • 2021-06-18
  • 2021-07-26
  • 2022-12-23
相关资源
相似解决方案