debug server :
环境 utbuntu 14.04
安装必须软件
apt-get install isc-dhcp-server vtun bridge-utils
修改 /etc/network/interfaces 增加调试用借口
iface debug0 inet static
address 10.254.0.1
netmask 255.255.0.0
pre-up brctl addbr debug0
配置isc-dhcp服务器,使得为debug0接口开启dhcp server
修改 /etc/default/isc-dhcp-server
配置 INTERFACES="debug0"
vi /etc/dhcp/dhcpd.conf
修改dhcpd的地址范围等信息
在 /etc/dhcp/dhcpd.conf 中增加
subnet 10.254.0.0 netmask 255.255.0.0 {
range 10.254.0.10 10.254.255.254;
option broadcast-address 10.254.255.255;
default-lease-time 600;
max-lease-time 7200;
}
重启 服务
/etc/init.d/isc-dhcp-server restart
修改vtun运行模式:
vi /etc/default/vtun
确认 RUN_SERVER=yes
修改vtun配置
vi /etc/vtund.conf
建立自己的配置项目:
如下
options {
port 8090; # Listen on this port.
# Syslog facility
syslog daemon;
}
# Default session options
default {
compress no; # Compression is off by default
encrypt no;
}
BeeOSDebug {
passwd aaaaa; # Password
type ether; # ether tunnel
proto udp; # udp protocol
keepalive yes; # Keep connection alive
compress no;
encrypt yes;
}
openwrt或其他linux下建立vtun client
在 /etc/config/network 中添加
config interface ‘lan_debug‘
option ifname ‘tap0‘
option macaddr ‘00:11:fc:10:10:11‘
option proto ‘dhcp‘
建立client配置文件
options {
port 8090; # Connect to this port.
timeout 5; # General timeout
}
# TUN example. Session ‘cobra‘.
BeeOSDebug {
passwd aaaaa; # Password
keepalive yes;
persist yes; # Persist mode
}
最后自行编写启动和停止文件即可