{"id":68,"date":"2010-03-05T21:59:00","date_gmt":"2010-03-05T14:59:00","guid":{"rendered":"http:\/\/blog.trichev.com\/2010\/03\/05\/internet-connection-sharing-with-kubuntu-9-10-isp-dom-ru\/"},"modified":"2017-08-11T03:43:20","modified_gmt":"2017-08-10T20:43:20","slug":"internet-connection-sharing-with-kubuntu-9-10-isp-dom-ru","status":"publish","type":"post","link":"https:\/\/trichev.com\/blog\/2010\/03\/05\/internet-connection-sharing-with-kubuntu-9-10-isp-dom-ru\/","title":{"rendered":"Internet Connection Sharing with Kubuntu 9.10 (ISP dom.ru)"},"content":{"rendered":"<p>\u0414\u043e\u043c\u0430 \u0443\u0436\u0435 \u0434\u043e\u0435&#8230;\u043d\u0438 \u043c\u0430\u0442\u0435\u0440\u0438 \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 &#8220;\u0441\u043e\u0441\u0435\u0442&#8221; \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0423\u0436\u0435 \u0433\u043e\u0434 \u043a\u0430\u043a \u043c\u0435\u0447\u0442\u0430\u044e \u043f\u0440\u0438\u043a\u0443\u043f\u0438\u0442\u044c Wi-Fi \u0440\u043e\u0443\u0442\u0435\u0440, \u043d\u043e \u0436\u0430\u043b\u043a\u043e \u0434\u0435\u043d\u0435\u0433. \u0420\u0435\u0448\u0438\u043b \u044f \u0437\u0430\u043c\u0443\u0442\u0438\u0442\u044c \u0448\u043b\u044e\u0437 \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u0441 Kubuntu 9.10, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0430\u0431\u0434\u0438\u0432 \u0435\u0433\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u0435\u0442\u0435\u0432\u0443\u0445\u0430\u043c\u0438.<br \/>\n\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c:<br \/>\neth0 (\u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442)<br \/>\neth1 (\u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u043a\u0443)<br \/>\n\u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u0435 \u0432\u043f\u0430\u0434\u043b\u0443 \u0431\u044b\u043b\u043e \u0447\u0435-\u0442\u043e \u043c\u0443\u0442\u0438\u0442\u044c \u0441 \u043c\u0430\u043a\u043e\u043c \u0438 \u044f \u0435\u0433\u043e \u0442\u0443\u043f\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b \u043d\u0430 &#8220;\u043d\u0443\u0436\u043d\u044b\u0439&#8221;, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0438\u0437 \u0432\u0438\u043d\u0434\u043e\u0432\u043e\u0439 \u0425\u041f\u0438!:<br \/>\n\u041a\u0442\u043e-\u0442\u043e \u0438\u0437 \u0433\u0443\u0433\u043b\u044f \u0441\u043a\u0430\u0437\u0430\u043b \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \/etc\/network\/if-pre-up.d\/ \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043c \u043e\u0442 \u0440\u0443\u0442\u0430 \u0444\u0430\u0439\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 pre-up:<br \/>\n#!\/bin\/sh<br \/>\nifconfig eth0 hw ether 00:00:00:00<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0434\u0435\u043b\u0430\u043b pppoeconf, \u0432\u043f\u0438\u0441\u0430\u0432 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f PPPoE \u0441\u0435\u0441\u0441\u0438\u0438+\u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437 \u0438 \u0434\u0440\u0443\u0433\u0443\u044e \u0435\u0440\u0443\u043d\u0434\u0443&#8230;\u0442\u0443\u043f\u043e \u0432\u0438\u0437\u0430\u0440\u0434. \u0412\u0443\u0430\u043b\u044f, \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0448\u043b\u044e\u0437\u0435 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c!<br \/>\n\u041c\u043e\u0439 \/etc\/network\/interfaces:<\/p>\n<p>auto lo<br \/>\niface lo inet loopback<\/p>\n<p>auto dsl-provider<br \/>\niface dsl-provider inet ppp<br \/>\npre-up \/sbin\/ifconfig eth0 up # line maintained by pppoeconf<br \/>\nprovider dsl-provider<\/p>\n<p>auto eth0<br \/>\niface eth0 inet manual<\/p>\n<p>auto eth1<br \/>\niface eth1 inet static<br \/>\naddress 192.168.0.1<br \/>\nnetmask 255.255.255.0<\/p>\n<p>\u041f\u043e\u0435\u0445\u0430\u043b\u0438 \u0434\u0430\u043b\u044c\u0448\u0435:<br \/>\napt-get install dnsmasq<\/p>\n<p>\u041e\u0442\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0444\u0430\u0439\u043b \/etc\/dnsmasq.conf:<br \/>\ninterface=eth0<br \/>\ndhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h <\/p>\n<p>\u0412 \/etc\/sysctl.conf \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b:<br \/>\nnet.ipv4.ip_forward = 1<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043b \/etc\/init.d\/gateway:<br \/>\n#!\/bin\/sh<br \/>\niptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE<\/p>\n<p>chmod +x \/etc\/init.d\/gateway.<\/p>\n<p>update-rc.d gateway start 51 S .<\/p>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f \u0438 \u0432\u0441\u0435! DHCP-\u0441\u0435\u0440\u0432\u0430\u043a \u0430\u0434\u0440\u0435\u0441\u0430 \u0440\u0430\u0437\u0434\u0430\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u0430!<\/p>\n<p>\u0421\u0441\u044b\u043b\u043e\u0447\u043a\u0438:<br \/>\nhttp:\/\/forum.ubuntu.ru\/index.php?topic=61372.0<br \/>\nhttp:\/\/forum.ubuntu.ru\/index.php?topic=19127.0<br \/>\nhttps:\/\/help.ubuntu.com\/community\/Internet\/ConnectionSharing<br \/>\nhttp:\/\/www.liveinternet.ru\/users\/sergey_se\/post47935915\/<br \/>\nhttp:\/\/easylinux.ru\/node\/117<br \/>\nhttp:\/\/mydebianblog.blogspot.com\/2007\/02\/blog-post_24.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043e\u043c\u0430 \u0443\u0436\u0435 \u0434\u043e\u0435&#8230;\u043d\u0438 \u043c\u0430\u0442\u0435\u0440\u0438 \u0432\u0441\u044f\u043a\u043e\u0433\u043e \u0436\u0435\u043b\u0435\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 &#8220;\u0441\u043e\u0441\u0435\u0442&#8221; \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442. \u0423\u0436\u0435 \u0433\u043e\u0434 \u043a\u0430\u043a \u043c\u0435\u0447\u0442\u0430\u044e \u043f\u0440\u0438\u043a\u0443\u043f\u0438\u0442\u044c Wi-Fi \u0440\u043e\u0443\u0442\u0435\u0440, \u043d\u043e \u0436\u0430\u043b\u043a\u043e \u0434\u0435\u043d\u0435\u0433. \u0420\u0435\u0448\u0438\u043b \u044f \u0437\u0430\u043c\u0443\u0442\u0438\u0442\u044c \u0448\u043b\u044e\u0437 \u043d\u0430 \u043a\u043e\u043c\u043f\u0435 \u0441 Kubuntu 9.10, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043d\u0430\u0431\u0434\u0438\u0432 \u0435\u0433\u043e \u0434\u0432\u0443\u043c\u044f \u0441\u0435\u0442\u0435\u0432\u0443\u0445\u0430\u043c\u0438. \u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0438\u043c\u0435\u0435\u043c: eth0 (\u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442) eth1 (\u0441\u043c\u043e\u0442\u0440\u0438\u0442 \u0432 \u043b\u043e\u043a\u0430\u043b\u043a\u0443) \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u043d\u0435 \u0432\u043f\u0430\u0434\u043b\u0443 \u0431\u044b\u043b\u043e \u0447\u0435-\u0442\u043e \u043c\u0443\u0442\u0438\u0442\u044c \u0441 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[231],"tags":[64,46,32,14,11],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/68"}],"collection":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":1,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/68\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}