Use bluetooth to build a personal wireless LAN, convenient, practical and flexible.
First you need to install bluez-libs, bluez-utils, and the benep module in the kernel.
1: Start Bluetooth hciconfig hci0 up piscan
2: modprobe bnep
*The above steps must be performed on both the host and the client
< BR>3: On the host, run pand --listen --role NAP --master
On the client, run pand --connect 00:11:67:46:4E:4E --role NAPU
4: When using pand -l you can see
bnep0 00:11:67:46:4E:4E PANU
Description Connection success
5: Set ifconfig bnep0 10.10.106.1 on the host.
Set ifconfig bnep0 10.10.106.2
on the client. You can ping from 10.10.106.2 to 10.10.106.1. Br>
If you need to share the Internet, you need to use iptable on the host to set it up.
Client to add route
route add -net default gw 10.10.106.1
The following is my iptable script.
#!/bin/bash
IPTABLES='/usr/sbin/iptables'
# Set interface values
EXTIF='ppp0' < Br>
INTIF1='bnep0'
# enable ip forwarding in the kernel
/bin/echo 1 > /proc/sys/net/ipv4/ip_forward
# flush rules and delete chains
$IPTABLES -F
$IPTABLES -X
# enable masquerading to allow LAN internet access
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
# forward LAN traffic from $INTIF1 to Internet interface $EXTIF
$IPTABLES -A FORWARD -i $INTIF1 -o $EXTIF -m state --state NEW,ESTABLISHED -j ACCEPT
#echo -e " - Allowing access to the SSH server"
$IPTABLES -A INPUT --protocol tcp --dport 22 -j ACCEPT
#echo -e " - Allowing access to the HTTP server"
$IPTABLES -A INPUT --protocol tcp --dport 80 -j ACCEPT
you want under Linux How to install the jdk you want under Linux? Last time we talked about how to u
Microsoft announced the extension of the Windows Vista and Windows 7 lifecycle. The life cycle of W
In the various Linux distributions now, the enterprise version of red hat is relatively safe. For t
Devil-Linux is a special Linux distribution for firewalls and routers. The goal of Devil-Linux is to
Novice trick: dd command skill under Linux operating system
Linux Squid installation and debugging several commonly used commands introduced
Linux station group rsync synchronization basic tutorial
Remember that the Auto Increment fault
Description of the TIME/TIME+ value under the Linux TOP command
Git and Github first use basic tutorials
Replace VMware ESX Server Console NIC and Recovery Solution
Xauth: (stdin):1: bad display name "LSPPC-Lenny:1" in "ad
Simple operation Ten "fast" in Linux system
Win8.1 adds the SkyDrive folder to the user database for easy viewing.
Microsoft's experience gained through win7 system
Win10 wp recovery tool can not be installed how to do
Disable win10 system to restart the computer desktop icon rearrangement method
Detailed explanation: Win8 media stream setting step
Windows10 search button how to unlock this function is locked by default
How to quickly display hidden files in Win8 system
Windows 7 and SSD (Solid State Drive)