centos 配置蓝牙共享网络 发表于 2015-12-23 更新于 2023-08-23 安装centos蓝牙库: 1yum install bluez.x86_64 bluez-compat.x86_64 安装蓝牙认证库: 1yum -y install pygobject2 dbus-python-devel.x86_64 dbus-python 配置dhcpd: 1234567891011vim /etc/dhcp/dhcpd.confignore client-updates;subnet 10.0.0.0 netmask 255.255.255.0 { option routers 10.0.0.1; option subnet-mask 255.255.255.0; option domain-name-servers 10.16.0.222; range dynamic-bootp 10.0.0.10 10.0.0.50;} 上网设置: 12345678910111213brctl addbr pan1brctl stp pan1 offecho "1">/proc/sys/net/ipv4/ip_forwardifconfig pan1 10.0.0.1/24iptables -A POSTROUTING -s 10.0.0.0/24 -j MASQUERADE#iptables -D FORWARD 1#watch -n 1 iptables -L -n -v/etc/init.d/dhcpd restarthciconfig hci0 up piscanmodprobe bneppand --listen --role NAP --masternohup python /root/src/simple-agent.py > /tmp/blue-agent.log 2>&1