{"id":3,"date":"2008-06-12T18:01:25","date_gmt":"2008-06-12T14:01:25","guid":{"rendered":"http:\/\/alfsoft.ru\/?p=3"},"modified":"2011-06-20T10:56:14","modified_gmt":"2011-06-20T06:56:14","slug":"3","status":"publish","type":"post","link":"http:\/\/alfsoft.ru\/?p=3","title":{"rendered":"Ubuntu: \u0420\u0430\u0437\u0434\u0430\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043d\u0430 Palm \u0447\u0435\u0440\u0435\u0437 Bluetooth &#8211; \u0437\u0430 10 \u0448\u0430\u0433\u043e\u0432"},"content":{"rendered":"<p>\u0421\u043c\u044b\u0441\u043b \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438: \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u041a\u041f\u041a Palm, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Bluetooth \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 Linux. \u0425\u043e\u0442\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c &#8211; \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Linux \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043d\u0430 Palm \u0447\u0435\u0440\u0435\u0437 Bluetooth.<br \/>\n\u0418\u0442\u043e\u0433\u043e\u043c \u0432\u0441\u0435\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e:<br \/>\n<img src=\"http:\/\/alfsoft.ru\/wp-content\/uploads\/2008\/06\/picture_1.png\" alt=\"\" \/> <img src=\"http:\/\/alfsoft.ru\/wp-content\/uploads\/2008\/06\/picture_2.png\" alt=\"\" \/><br \/>\n<!--more--><br \/>\n<strong>\u0428\u0430\u0433 1<\/strong><br \/>\n\u0423\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0430\u043a\u0435\u0442\u044b <strong>ipmasq<\/strong> \u0438 <strong>dnsmasq<\/strong>:<br \/>\n[source language=&#8217;bash&#8217;]<br \/>\napt-get install ipmasq dnsmasq<\/p>\n<p>gksudo gedit \/etc\/bluetooth\/hcid.conf<br \/>\n[\/source]<br \/>\n\u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438\u0449\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0443\u044e \u0438\u043c\u044f Bluetooth \u043d\u0430 \u041f\u041a <strong>name &#8220;%h-%d&#8221;<\/strong> \u0438 \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: <strong>name &#8220;ubuntu&#8221;;<\/strong><br \/>\n\u0417\u0430\u0442\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <strong>security user;<\/strong> \u043c\u0435\u043d\u044f\u0435\u043c \u043d\u0430 <strong>security auto<\/strong>. \u0422\u0430\u043a\u0436\u0435 \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0438 <strong>auth enable<\/strong> \u0438 <strong>encrypt enable<\/strong> \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c.<\/p>\n<p><strong>\u0428\u0430\u0433 2<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\ngksudo gedit \/etc\/bluetooth\/pin<br \/>\n[\/source]<br \/>\n\u0421\u043c\u0435\u043d\u0438\u0442\u0435 <strong>1234<\/strong> \u043d\u0430 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 (\u0426\u0418\u0424\u0420\u042b!), \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438 \u0437\u0430\u043a\u0440\u043e\u0439\u0442\u0435.<br \/>\n<em>NB: \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0444\u0430\u0439\u043b \u043e\u0442\u043a\u0440\u044b\u043b\u0441\u044f \u043f\u0443\u0441\u0442\u044b\u043c, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u043d\u0435 \u043c\u0435\u043d\u044f\u043b 1234, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b. \u041d\u0435 \u043f\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c.<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 3<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\nsudo nano \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\n[\/source]<br \/>\n\u0417\u0430\u043c\u0435\u043d\u0438\u0442\u0435 0 \u043d\u0430 1 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 (Ctrl+X, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 &#8216;Y&#8217;, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 Enter)<\/p>\n<p><strong>\u0428\u0430\u0433 4<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\nsudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br \/>\n[\/source]<br \/>\n<em>NB: \u041f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432 Ubuntu, \u0440\u0430\u0437\u0434\u0430\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 &#8211; eth0, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u043e\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, eth1, \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 \u0441\u0432\u043e\u0439 \u0432 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 5<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\nsudo iptables -A FORWARD -i ppp0 -j ACCEPT<br \/>\n[\/source]<br \/>\n<strong>\u0428\u0430\u0433 6<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\nsudo iptables -A FORWARD -m state &#8211;state ESTABLISHED,RELATED -j ACCEPT<br \/>\n[\/source]<br \/>\n<strong>\u0428\u0430\u0433 7<\/strong><br \/>\n\u041d\u0430\u0439\u0434\u0435\u043c IP \u043d\u0430\u0448\u0435\u0433\u043e DNS-\u0441\u0435\u0440\u0432\u0435\u0440\u0430:<br \/>\n[source language=&#8217;bash&#8217;]<br \/>\ncat \/etc\/resolv.conf<br \/>\n[\/source]<br \/>\n\u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043d\u0430\u043c \u0432\u044b\u0434\u0430\u0441\u0442 \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e: <strong>nameserver 192.168.0.1<\/strong>. \u042d\u0442\u043e\u0442 IP-\u0430\u0434\u0440\u0435\u0441 \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0434\u0440\u0435\u0441\u043e\u043c DNS.<br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b PPP-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 Palm \u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c.<br \/>\n[source language=&#8217;bash&#8217;]<br \/>\ngksudo gedit \/etc\/ppp\/peers\/palm<br \/>\n[\/source]<\/p>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 palm:<br \/>\n[source language=&#8217;bash&#8217;]<br \/>\n115200<br \/>\n192.168.2.1:192.168.2.2<br \/>\nlocal<br \/>\nms-dns 192.168.0.1<br \/>\nnoauth<br \/>\ndebug<br \/>\n[\/source]<\/p>\n<p><em>NB: \u0412\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 <strong>ms-dns 192.168.0.1<\/strong>? \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0434\u0440\u0443\u0433\u043e\u0439 DNS-\u0430\u0434\u0440\u0435\u0441, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442.<\/em><\/p>\n<p><strong>\u0428\u0430\u0433 8<\/strong><br \/>\n[source language=&#8217;bash&#8217;]<br \/>\ndund &#8211;nodetach &#8211;listen &#8211;persist &#8211;msdun call palm<br \/>\n[\/source]<br \/>\n\u042d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u0434\u0435\u043c\u043e\u043d\u0430 Bluetooth LAP (Lan access over PPP) \u0432 \u043d\u0435-\u0434\u0435\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u043c :0) \u0440\u0435\u0436\u0438\u043c\u0435 \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 Bluetooth-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u041a\u041f\u041a \u0438 \u041f\u041a.<\/p>\n<p><strong>\u0428\u0430\u0433 9<\/strong><br \/>\n\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Palm:<br \/>\n\u0430) Prefs &#8211; Connection &#8211; New&#8230;<br \/>\n\u0431) Name: LinuxBT (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440), Connect to: PC, Via: Bluetooth.<br \/>\n\u0432) \u0416\u043c\u0438\u0442\u0435 Tap to Find, \u0438 \u0438\u0437 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u041f\u041a (\u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u043c\u044b \u0435\u0433\u043e \u043d\u0430\u0437\u0432\u0430\u043b\u0438 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 ubuntu)<br \/>\n\u0433) \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c, \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u041e\u041a.<br \/>\n\u0434) \u0418\u0434\u0435\u043c \u0432 Prefs &#8211; Network<br \/>\n\u0435) Service: Linux, User Name\/Password &#8211; \u043f\u0443\u0441\u0442\u044b\u0435, Connection: LinuxBT.<br \/>\n\u0436) \u0416\u043c\u0438\u0442\u0435 Connect.<\/p>\n<p>\u041d\u0430\u0448 dund \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0437\u0443 \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c!<\/p>\n<p><strong>\u0428\u0430\u0433 10<\/strong><br \/>\n\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0448\u0435\u043b\u043b-\u0441\u043a\u0440\u0438\u043f\u0442 \u0440\u0430\u0441\u0448\u0430\u0440\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<br \/>\n[source language=&#8217;bash&#8217;]<br \/>\ngksudo gedit \/etc\/init.d\/start_bluetooth.sh<br \/>\n[\/source]<\/p>\n<p>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 start_bluetooth.sh:<\/p>\n<p><code>#!\/bin\/bash<br \/>\necho 1 > \/proc\/sys\/net\/ipv4\/ip_forward<br \/>\niptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br \/>\niptables -A FORWARD -i ppp0 -j ACCEPT<br \/>\niptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT<br \/>\nkillall -v dund<br \/>\ndund --listen --persist --msdun call palm<\/code><\/p>\n<p>\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0438 \u0437\u0430\u043a\u0440\u043e\u0435\u043c. \u0417\u0430\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c:<\/p>\n<p>[source language=&#8217;bash&#8217;]<br \/>\nsudo chmod -v 755 \/etc\/init.d\/start_bluetooth.sh<br \/>\nsudo ln -sv \/etc\/init.d\/start_bluetooth.sh \/etc\/rc2.d\/S98start_bluetooth<br \/>\n[\/source]<\/p>\n<p>\u0413\u043e\u0442\u043e\u0432\u043e!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u043c\u044b\u0441\u043b \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438: \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u041a\u041f\u041a Palm, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 Bluetooth \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 Linux. \u0425\u043e\u0442\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u0430\u0437\u0430\u0442\u044c &#8211; \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c Linux \u0440\u0430\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043d\u0430 Palm \u0447\u0435\u0440\u0435\u0437 Bluetooth. \u0418\u0442\u043e\u0433\u043e\u043c \u0432\u0441\u0435\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u044d\u0442\u043e:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[6,5,4,3],"_links":{"self":[{"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/posts\/3"}],"collection":[{"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3"}],"version-history":[{"count":5,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/posts\/3\/revisions"}],"predecessor-version":[{"id":50,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=\/wp\/v2\/posts\/3\/revisions\/50"}],"wp:attachment":[{"href":"http:\/\/alfsoft.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/alfsoft.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}