From d911ce5bedb8c43950a5345a841e39ca5639db0d Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Sat, 25 Feb 2006 18:57:49 +0000 Subject: [PATCH] Added bluenet howto --- hints/bluenet.html | 242 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 hints/bluenet.html diff --git a/hints/bluenet.html b/hints/bluenet.html new file mode 100644 index 0000000..75bcfcf --- /dev/null +++ b/hints/bluenet.html @@ -0,0 +1,242 @@ + + +óÏÅÄÉÎÅÎÉÅ ËÏÍÐØÀÔÅÒÏ× × ÓÅÔØ ÞÅÒÅÚ Bluetooth + + +

óÏÅÄÉÎÎÉÅ ËÏÍÐØÀÔÅÒÏ× × ÓÅÔØ ÞÅÒÅÚ bluetooth

+ +ëÏÇÄÁ Õ ÍÅÎÑ ÚÁ×ÅÌÁÓØ × ÄÏÍÅ ÐÁÒÏÞËÁ Bluetooth ÁÄÁÐÔÅÒÏ×, ÍÎÅ ÚÁÈÏÔÅÌÏÓØ +ÉÓÐÏÌØÚÏ×ÁÔØ ÉÈ ÎÅ ÔÏÌØËÏ ÄÌÑ ÏÂÍÅÎÁ ÄÁÎÎÙÍÉ Ó ÍÏÂÉÌØÎÙÍÉ ÔÅÌÅÆÏÎÁÍÉ, ÎÏ +É ÄÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÓÅÔÉ, ÞÔÏÂÙ ÐÅÒÅÍÅÝÁÑÓØ Ó ÎÏÕÔÂÕËÏÍ ÐÏ ËÏÍÎÁÔÅ ÎÅ +ÐÒÉÈÏÄÉÌÏÓØ ÔÁÓËÁÔØ ÚÁ ÓÏÂÏÊ ethernet-Ï×ÓËÉÊ ËÁÂÅÌØ. +

+÷ÓÅ ÏÐÉÓÁÎÉÑ PAN (Personal area networking) ËÏÔÏÒÙÅ ÍÎÅ ÕÄÁÌÏÓØ ÎÁÊÔÉ × +ÓÅÔÉ (ÎÁÐÒÉÍÅÒ ÜÔÏ) ËÁËÉÅ-ÔÏ +ÆÒÁÇÍÅÎÔÁÒÎÙÅ. ðÏÜÔÏÍÕ Ñ ÒÅÛÉÌ ÏÐÉÓÁÔØ Ó×ÏÊ ÓÏÂÓÔ×ÅÎÎÙÊ ÏÐÙÔ. ÷ÐÒÏÞÅÍ, +×ÒÑÄ ÌÉ Õ ÍÅÎÑ ÐÏÌÕÞÉÔÓÑ ÌÕÞÛÅ. + +

ðÏÓÔÁÎÏ×ËÁ ÚÁÄÁÞÉ

+ +éÍÅÅÔÓÑ: +
    +
  1. óÔÁÃÉÏÎÁÒÎÙÊ ËÏÍÐØÀÔÅÒ, ÐÏÄËÌÀÞÅÎÎÙÊ Ë ÉÎÔÅÒÎÅÔÕ. +
  2. ìÏËÁÌØÎÁÑ ÓÅÔØ ÐÏÄËÌÀÞÅÎÎÁÑ Ë ÄÁÎÎÏÍÕ ËÏÍÐØÀÔÅÒÕ (Ô.Å ÚÁÄÁÞÉ +ÆÏÒ×ÁÒÄÉÇÁ, ÍÁÓËÁÒÁÄÉÎÇÁ etc ÕÖÅ ÒÅÛÅÎÙ, É ÎÁ ËÏÍÐØÀÔÅÒÅ ÉÍÅÅÔÓÑ +ÒÁÂÏÔÁÀÝÊ dhcp-ÓÅÒ×ÅÒ) +
  3. îÅËÏÔÏÒÏÅ ËÏÌÉÞÅÓÔ×Ï ÎÏÕÔÂÕËÏ× (N, N<7) +
  4. îÅËÏÔÏÒÏÅ ËÏÌÉÞÅÓÔ×Ï (N+1) USB Bluetooth ÁÄÁÐÔÅÒÏ× +
+ +èÏÞÅÔÓÑ:
+þÔÏÂÙ ÐÒÉ ×ÔÙËÁÎÉÉ × ÎÏÕÔÂÕË bluetooth ÁÄÁÐÔÅÒÁ ÐÕÔÅÍ ÍÉÎÉÍÁÌØÎÙÈ +ÔÅÌÏÄ×ÉÖÅÎÉÊ ÎÏÕÔÂÕË ÏËÁÚÁÌÓÑ × ÓÅÔÉ. + +

îÁÓÔÒÏÊËÁ ÔÏÞËÉ ÄÏÓÔÕÐÁ

+ôÏÞËÏÊ ÄÏÓÔÕÐÁ Ñ×ÌÑÅÔÓÑ ÓÔÁÃÉÏÎÁÒÎÙÊ ËÏÍÐØÀÔÅÒ. îá ÎÅÍ Õ ÍÅÎÑ ÓÔÏÉÔ +Debian sarge. +

+äÌÑ ÏÒÇÁÎÉÚÁÃÉÉ ÄÏÓÔÕÐÁ ÔÒÅÂÕÅÔÓÑ ÒÅÛÉÔØ Ä×Å ÚÁÄÁÞÉ +

    +
  1. þÔÏÂÙ ËÏÍÐØÀÔÅÒ ÐÒÉÎÉÍÁÌ ÓÏÅÄÉÎÅÎÉÑ +
  2. þÔÏÂÙ ÐÏÓÌÅ ÕÓÔÁÎÏ×ËÉ ÓÏÅÄÉÎÅÎÉÑ ÐÏ dhcp ÏÔÄÁ×ÁÌÁÓØ ÎÅÏÂÈÏÄÉÍÁÑ +ËÏÎÆÉÇÕÒÁÃÉÏÎÎÁÑ ÉÎÆÏÒÍÁÃÉÑ +
+äÌÑ ÒÅÛÅÎÉÑ ÐÅÒ×ÏÊ ÚÁÄÁÞÉ ÄÏÓÔÁÔÏÞÎÏ ÚÁÐÕÓÔÉÔØ sdpd É pand Ó ÐÒÁ×ÉÌØÎÙÍÉ +ÐÁÒÁÍÅÔÒÁÍÉ. üÔÉ ÄÅÍÏÎÙ (ËÁË É hcid) ×ÈÏÄÑÔ × ÐÁËÅÔ bluez-utils. +

+÷ Debian ÄÌÑ ÜÔÏÇÏ ÄÏÓÔÁÔÏÞÎÏ ÐÒÏÐÉÓÁÔØ Ä×Å ÓÔÒÏÞËÉ × +/etc/default/bluez-utils +

+PAND_ENABLED=1
+PAND_OPTIONS="--listen --role NAP"
+
+ +òÅÛÅÎÉÅ ×ÔÏÒÏÊ ÚÁÄÁÞÉ - ÂÏÌÅÅ ÓÌÏÖÎÏÅ É ÍÅÎÅÅ ÄÏËÕÍÅÎÔÉÒÏ×ÁÎÏÅ. ÷ÉÄÉÍÏ, +ÂÏÌØÛÉÎÓÔ×Ï Á×ÔÏÒÏ× ÈÁÕÔÕÛÅË ÐÏÄÎÉÍÁÌÉ ÓÔÁÔÉÞÅÓËÉÅ ÁÄÒÅÓÁ ÎÁ ÏÂÏÉÈ +ËÏÎÃÁÈ ÌÉÎËÁ É ÎÁ ÜÔÏÍ ÕÓÐÏËÁÉ×ÁÌÉÓØ. îÏ Õ ÍÅÎÑ ÅÓÔØ ÖÅÎÁ, Á Õ ÖÅÎÙ - +ÎÏÕÔÂÕË. ðÏÜÔÏÍÕ ÐÒÉÈÏÄÉÔÓÑ ÒÅÛÁÔØ ÚÁÄÁÞÕ × ÏÂÝÅÍ ×ÉÄÅ - Ó ×ÏÚÍÏÖÎÏÓÔØÀ +ÐÏÄËÌÀÞÅÎÉÑ ÂÏÌÅÅ ÞÅÍ ÏÄÎÏÇÏ ÕÓÔÒÏÊÓÔ×Á. +

+äÌÑ ÔÏÇÏ ÞÔÏÂÙ dhcp-ÓÅÒ×ÅÒ ÓÌÕÛÁÌ ÎÁ ÉÎÔÅÒÆÅÊÓÅ, ÉÎÔÅÒÆÅÊÓ ÄÏÌÖÅÎ +ÓÕÝÅÓÔ×Ï×ÁÔØ × ÍÏÍÅÎÔ ÚÁÐÕÓËÁ dhcpd. âÏÌÅÅ ÔÏÇÏ, pand ÓÏÚÄÁÅÔ ÄÌÑ +ËÁÖÄÏÇÏ bluetooth-ÓÏÅÄÉÎÅÎÉÑ ÏÔÄÅÌØÎÙÊ ÉÎÔÅÒÆÅÊÓ. úÁÍÕÞÁÅÛØÓÑ ÏÐÉÓÙ×ÁÔØ +É ÐÅÒÅÄÅÒÇÉ×ÁÔØ dhcpd ÐÏ ËÁÖÄÏÍÕ ÓÏÅÄÉÎÅÎÉÀ. ðÏÜÔÏÍÕ ×ÓÅ HOWTO +ÒÅËÏÍÅÎÄÕÀÔ ÉÓÐÏÌØÚÏ×ÁÔØ bridging. üÔÏ ÔÁËÁÑ ÆÕÎËÃÉÏÎÁÌØÎÏÓÔØ × +ÌÉÎÕËÓÏ×ÏÍ ÑÄÒÅ, ÐÏÚ×ÏÌÑÀÝÁÑ ÏÂßÅÄÉÎÉÔØ ÎÅÓËÏÌØËÏ ÆÉÚÉÞÅÓËÉÈ ÉÎÔÅÒÆÅÊÓÏ× +× ÏÄÉÎ. äÌÑ ÒÁÂÏÔÙ Ó ÂÒÉÄÖÉÎÇÏÍ ÎÁÍ ÐÏÎÁÄÏÂÉÔÓÑ ÐÁËÅÔ bridge-utils, × +ÓÏÓÔÁ× ËÏÔÏÒÏÇÏ ×ÈÏÄÉÔ ÕÔÉÌÉÔÁ brctl. +

+÷ PAN-HOWTO ÒÅËÏÍÅÎÄÕÅÔÓÑ ÏÒÇÁÎÉÚÏ×ÁÔØ ÂÒÉÄÖ-ÉÎÔÅÒÆÅÊÓ, × ËÏÔÏÒÙÊ ÂÕÄÅÔ +ÄÏÂÁ×ÌÅÎ ÜÚÅÒÎÅÔ-ÉÎÔÅÒÆÅÊÓ ÌÏËÁÌØÎÏÊ ÓÅÔÉ É ÂÕÄÕÔ Á×ÔÏÍÁÔÉÞÅÓËÉ +ÄÏÂÁ×ÌÑÔØÓÑ bluetooth-ÉÎÔÅÒÆÅÊÓÙ ÐÏ ÍÅÒÅ ×ÏÚÎÉËÎÏ×ÅÎÉÑ. +

+îÉËÏÇÄÁ ÔÁË ÎÅ ÄÅÌÁÊÔÅ. äÅÌÏ × ÔÏÍ ÞÔÏ ÂÒÉÄÖ ÏÎ ÐÏ Ó×ÏÅÊ ÐÒÉÒÏÄÅ +×ÒÏÄÅ ÈÁÂÁ - ÏÎ ÐÒÏÔÁÌËÉ×ÁÅÔ ×ÓÅ ÐÁËÅÔÙ, ÐÒÉÈÏÄÑÝÉÅ ÎÁ ÏÄÉÎ ÉÚ +×ËÌÀÞÅÎÎÙÈ × ÎÅÇÏ ÉÎÔÅÒÆÅÊÓÏ× ×Ï ×ÓÅ ÏÓÔÁÌØÎÙÅ. óÏÏÔ×ÅÔÓÔ×ÅÎÎÏ, +ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔØ ÂÒÉÄÖÁ ÒÁ×ÎÁ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔÉ ÓÁÍÏÇÏ ÔÏÒÍÏÚÎÏÇÏ ÉÚ +×ËÌÀÞÅÎÎÙÈ × ÎÅÇÏ ÉÎÔÅÒÆÅÊÓÏ×. ðÏÜÔÏÍÕ ×ËÌÀÞÉ× × ÏÄÉÎ ÂÒÉÄÖ 100-mb +ethernet É bluetooth, ×Ù ÐÏÓÁÄÉÔÅ ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÏÓÔØ ethernet-Á ÄÏ +ÐÒÏÉÚ×ÏÄÉÔÅÌØÎÓÏÔÉ ÂÌÀÔÕÚÁ - Ô.Å. ÄÏ ÐÒÉÍÅÒÎÏ ÏÄÎÏÇÏ ÍÅÇÁÂÉÔÁ. +

+ðÏÜÔÏÍÕ ÍÙ ÄÅÌÁÅÍ ÓÌÅÄÕÀÝÅÅ: +

    +
  1. óÏÚÄÁÅÍ É ÎÁÓÔÒÁÉ×ÁÅÍ ÂÒÉÄÖÅ +
  2. îÅ ×ËÌÀÞÁÅÍ ÎÉ ÏÄÎÏÇÏ ÆÉÚÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ × ÜÔÏÔ ÂÒÉÄÖ +
  3. îÁÐÕÓËÁÅÍ ÎÁ ÜÔÏÔ ÂÒÉÄÖ dhcpd. +
+

+çÏÔÏ×ÏÇÏ ÓËÒÉÐÔÁ ËÕÄÁ ÍÏÖÎÏ ×ÐÉÓÁÔØ ËÏÍÁÎÄÙ ÓÏÚÄÁÎÉÑ ÂÒÉÄÖÁ Ñ ÎÅ ÎÁÛÅÌ. +ðÏÜÔÏÍÕ × /etc/init.d ÂÙÌ ÄÏÂÁ×ÌÅÎ ÓËÒÉÐÔ ÓÌÅÄÕÀÝÅÇÏ ÓÏÄÅÒÖÁÎÉÑ: + +

+#!/bin/sh
+#
+# This script configures bridge interface for Bluetooth Personal Area
+# network. This interface should be up before dhcpd started
+#
+#
+IFACE=pan0
+ADDRESS=10.0.0.1
+NETMASK=255.255.255.0
+BROADCAST=10.0.0.255
+
+case "$1" in
+start)
+	# Creating bridge interface $IFACE
+	brctl addbr $IFACE
+	# Setting options according to HOWTO-PAN
+	brctl setfd $IFACE 0
+	brctl stp $IFACE off
+	# Configuring interface
+	ifconfig $IFACE $ADDRESS netmask $NETMASK broadcast $BROADCAST
+	;;
+stop) ifconfig pan0 down
+	;;
+*) 
+	echo "Usage $0 start|stop" >&2 
+;;	
+esac
+
+ +îÁ ÜÔÏÔ ÓËÒÉÐÔ ÓÏÚÄÁÎ ÓÉÍÌÉÎË × /etc/rc2.d Ó ÎÏÍÅÒÏÍ, ÍÅÎØÛÉÍ ÞÅÍ Õ +dhcpd (ÔÏÔ S20, Á ÜÔÏÔ S15) +

+÷ ÐÒÉÎÃÉÐÅ, ÍÏÖÎÏ ÂÙÌÏ ÂÙ ÎÅ ×ËÌÀÞÁÔØ × ÜÔÏÔ ÓËÒÉÐÔ ËÏÍÁÎÄÕ ifconfig, Á +ÞÅÓÔÎÏ ÏÐÉÓÁÔØ ÅÇÏ × /etc/network/interfaces ËÁË + +

+auto pan0
+iface pan0 inet static
+	address 10.0.0.1
+	network 10.0.0.0
+	netmask 255.255.255.0
+	broadcast 10.0.0.255
+
+ +îÏ ÔÏÇÄÁ ÓÌÅÄÕÅÔ ÐÏÚÁÂÏÔÉÔØÓÑ, ÞÔÏÂÙ ÓËÒÉÐÔ, ×ÙÐÏÌÎÑÀÝÉÊ brctl +addbr. ×ÙÐÏÌÎÑÌÓÑ ÄÏ /etc/init.d/networking, Ô.Å. × /etc/rcS.d. +ðÏÞÅÍÕ-ÔÏ ÍÎÅ ÜÔÁ ÉÄÅÑ ÎÅ ÐÏÎÒÁ×ÉÌÁÓØ. +

+ôÅÐÅÒØ ËÏÇÄÁ Õ ÎÁÓ ÅÓÔØ ÉÎÔÅÒÆÅÊÓ, ÍÙ ÍÏÖÅÍ ÐÒÏÐÉÓÁÔØ × /etc/dhcpd.conf +ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÕÀ subnet É ÄÏÂÁ×ÉÔØ ÉÍÑ ÜÔÏÇÏ ÉÎÔÅÒÆÅÊÓÁ × ÓÔÒÏÞËÕ +INTERFACES × /etc/default/dhcpd. +

+ðÒÉ×ÅÄÕ ÎÁ ×ÓÑËÉÊ ÓÌÕÞÁÊ ÆÒÁÇÍÅÎÔ ÉÚ dhcpd.conf +

  
+# üÔÏ ÁÄÒÅÓ ÓÅÒ×ÅÒÁ × ethernet-ÓÅÔÉ
+server-identifier 192.168.217.1;
+
+  subnet 10.0.0.0 netmask 255.255.255.0 {
+  	max-lease-time 3600;
+	option subnet-mask 255.255.255.0;
+    default-lease-time 600;
+    option broadcast-address 10.0.0.255;
+    option time-servers 192.168.217.1;
+    option lpr-servers 192.168.217.1;
+    range 10.0.0.2 10.0.0.254;
+	# ïÂÑÚÁÔÅÌØÎÏ ÐÅÒÅÄÁ×ÁÊÔÅ domain-name ÓÅÒ×ÅÒ
+    option domain-name-servers 192.168.217.1;
+    option routers 10.0.0.1;
+	
+  }
+
+

+ïÓÔÁÌÏÓØ ÐÏÚÁÂÏÔÉÔØÓÑ Ï ÔÏÍ, ÞÔÏÂÙ ×ÎÏ×Ø ÐÏÑ×ÌÑÀÝÉÅÓÑ bnep-ÉÎÔÅÒÆÅÊÓÙ +×ËÌÀÞÁÌÉÓØ × ÜÔÏÔ ÂÒÉÄÖ É ÏÂÓÌÕÖÉ×ÁÌÉÓØ dhcpd. äÌÑ ÜÔÏÇÏ ÐÉÛÅÍ ÓËÒÉÐÔ +/etc/bluetooth/pan/dev-up ÓÌÅÄÕÀÝÅÇÏ ÓÏÄÅÒÖÁÎÉÑ: +

+#!/bin/sh
+brctl addif pan0 $1
+ifconfig $1 0.0.0.0
+
+ðÅÒ×ÁÑ ËÏÍÁÎÄÁ × ÜÔÏÍ ÓËÒÉÐÔÅ ÄÏÂÁ×ÌÑÅ ÉÎÔÅÒÆÅÊÓ $1 (Ô.Å. ÔÏÔ, ËÏÔÏÒÙÊ +pand ÐÅÒÅÄÁÌ × ËÁÞÅÓÔ×Å ÐÁÒÁÍÅÔÒÁ ÓËÒÉÐÔÕ) × ÂÒÉÄÖ pan0. +÷ÔÏÒÁÑ ËÏÍÁÎÄÁ - ÐÏÄÎÉÍÁÅÔ ÉÎÔÅÒÆÅÊÓ. õÓÔÁÎÁ×ÌÉ×ÁÔØ ÏÓÍÙÓÌÅÎÎÙÊ IP ÔÁÍ +ÎÅ ÎÁÄÏ, Ï ÜÔÏÍ ÐÏÚÁÂÏÔÉÔÓÑ ÕÒÏ×ÅÎØ ÂÒÉÄÖÁ. + + +

+äÁ, ÅÝÅ. òÅËÏÍÅÎÄÕÀ ÚÁÍÅÎÉÔØ ÎÁ ÜÔÏÍ ËÏÍÐØÀÔÅÒÅ ÓÔÁÎÄÁÒÔÎÙÊ ÓËÒÉÐÔ +bluez-pin ÎÁ ÞÔÏ-ÎÉÂÕÄØ ÍÅÎÅÅ ÉÎÔÅÒÁËÔÉ×ÎÏÅ. éÎÁÞÅ ×Ï ×ÓÑËÏÍ ÓÌÕÞÁÅ ÐÒÉ +ÐÅÒ×ÏÍ ÓÏÅÄÉÎÅÎÉÉ ÐÒÉÄÅÔÓÑ ××ÏÄÉÔØ PIN ÎÁ ÏÂÏÉÈ ËÏÍÐØÀÔÅÒÁÈ. +óÍ ÎÁÐÒÉÍÅÒ ÍÏÊ +×ÁÒÉÁÎÔ ÒÅÛÅÎÉÑ ÜÔÏÊ ÐÒÏÂÅÌÍÙ + + + +

îÁÓÔÒÏÊËÁ ËÌÉÅÎÔÁ

+ +îÁÓÔÒÏÊËÁ ËÌÉÅÎÔÁ ÎÁÍÎÏÇÏ ÐÒÏÝÅ. ðÏÓËÏÌØËÕ ÓÅÒ×ÅÒ ÁÎÎÏÒÓÉÒÕÅÔ ÓÅÂÑ ÐÏ +ÐÒÏÔÏËÏÌÕ sdp, ÔÏ ÎÁ ËÌÉÅÎÔÅ ÄÏÓÔÁÔÏÞÎÏ ÚÁÐÕÓÔÉÔØ +
+pand --search NAP
+
+þÔÏÂÙ ÓÏÅÄÉÎÅÎÉÅ ÕÓÔÁÎÏ×ÉÌÏÓØ. +

/etc/network/interfaces ÐÒÏÐÉÓÙ×ÁÅÍ +

+iface bnep0 inet dhcp
+
+É ÔÅÐÅÒØ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ×Ó£ ÚÁÒÁÂÏÔÁÌÏ, ÄÏÓÔÁÔÏÞÎÏ ÞÔÏÂÙ ËÔÏ-ÔÏ ÐÏÓÌÅ +ÕÓÔÁÎÏ×ÌÅÎÉÑ ÓÏÅÄÉÎÅÎÉÑ ÄÅÒÎÕÌ ifup bnep0 +

+ñ ÐÒÏÐÉÓÁÌ ÜÔÏ × /etc/bluetooth/pan/dev-up, ÈÏÔÑ, ×ÅÒÏÑÔÎÏ, +ÍÏÖÎÏ ÂÙÌÏ ÐÒÏÓÔÏ ÐÒÏÐÉÓÔÁØ × /etc/network/interfaces ÄÌÑ ÜÔÏÇÏ +ÉÎÔÅÒÆÅÊÓÑ mapping hotplug +

+ïÓÔÁÌÓÑ ÏÄÉÎ-ÅÄÉÎÓÔ×ÅÎÙÎÊ ×ÏÐÒÏÓ - Á ËÔÏ ÂÕÄÅÔ ÚÁÐÕÓËÁÔØ pand Ó ÒÕÔÏ×ÙÍÉ +ÐÒÁ×ÁÍÉ ÐÒÉ ×ÔÙËÁÎÉÉ bluetooth-ÁÄÁÐÔÅÒÁ × ÎÏÕÔÂÕË. íÏÑ ÐÁÒÁÎÏÊÑ ÎÅ +ÐÏÚ×ÏÌÑÅÔ ÒÁÚÒÅÛÉÔØ ÜÔÏ ÄÅÌÁÔØ hotplug-Õ. íÁÌÏ ÌÉ ÇÄÅ Ñ ÒÅÛÉÌ +×ÏÓÐÏÌØÚÏ×ÁÔØÓÑ bluetooth ÄÌÑ ÒÁÂÏÔÙ Ó ÍÏÂÉÌØÎÙÍ ÔÅÌÅÆÏÎÏÍ, É ÍÁÌÏ ÌÉ +ËÁËÕÀ ÓÅÔØ ÏÎÏ ÔÁÍ ÎÁÊÄÅÔ. ðÏÜÔÏÍÕ ÐÉÛÅÍ × /usr/local/bin +ÔÁËÏÊ ÓËÒÉÐÔ +

+#!/bin/sh
+case "$1" in
+on)
+        sudo pand --search NAP
+;;      
+off)
+        sudo pand -K
+;;      
+# úÄÅÓØ ÂÕÄÅÔ ×ÁÒÉÁÎÔ ÒÁÂÏÔÙ ÎÏÕÔÂÕËÁ ÓÅÒ×ÅÒÏÁ
+*)
+        echo "use $0 on|off" >&2
+        exit 1
+esac    
+
+ +é × /etc/sudoers ÐÒÏÐÉÓÙ×ÁÅÍ ÚÁÐÕÓË /usr/bin/pand ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÂÅÚ ÐÁÒÁÍÅÔÒÏ×. +

+ôÅÐÅÒØ ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÏËÁÚÁÔØÓÑ × ÓÅÔÉ ÎÁÍ ÎÕÖÎÏ ÓÄÅÌÁÔØ ÒÏ×ÎÏ Ä×Å ×ÅÝÉ: +

    +
  1. ÷ÏÔËÎÕÔØ bluetooth ÁÄÁÐÔÅÒ +
  2. ÓËÁÚÁÔØ bluenet on +
+ +äÏÐÏÌÎÉÔÅÌØÎÙÅ ÏÓÏÂÅÎÎÏÓÔÉ ÎÁÓÔÒÏÊËÉ dhcp ÎÁ ÎÏÕÔÂÕËÁÈ, ËÁË ÎÁÐÒÉÍÅÒ, ÐÏÌÅÚÎÏÓÔØ ÌÏËÁÌØÎÏÇÏ DNS-ÓÅÒ×ÅÒÁ, ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÐÁËÅÔÁ resolvconf ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ ÜÔÏÔ ÓÅÒ×ÅÒ ÈÏÄÉÌ Ë ÐÒÁ×ÉÌØÎÏÍÕ ÆÏÒ×ÁÒÄÅÒÕ, ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÏÐÃÉÉ time-servers É ntp-servers ÏÔÄÁ×ÁÅÍÙÈ dhcp-ÓÅÒ×ÅÒÏÍ ÄÌÑ ÓÉÎÈÒÏÎÉÚÁÃÉÉ ×ÒÅÍÅÎÉ ÏÓÔÁ×ÉÍ ÐÏËÁ ÚÁ ÓËÏÂËÁÍÉ. äÌÑ ÜÔÏÇÏ ÎÕÖÅÎ ÏÔÄÅÌØÎÙÊ ÔÅËÓÔ, ÔÁË ËÁË ÎÉÞÅÇÏ ÂÌÀÔÕÚ-ÓÐÅÃÉÆÉÞÎÏÇÏ × ÎÉÈ ÎÅÔ. ÷ ÓÌÕÞÁÅ ethernet ÔÁÍ ÔÒÅÂÕÅÔÓÑ ×Ó£ ÔÏ ÖÅ ÓÁÍÏÅ. + + -- 2.39.5