{"id":30841,"date":"2019-10-31T21:37:44","date_gmt":"2019-10-31T18:37:44","guid":{"rendered":"https:\/\/prohoster.info\/blog\/setevye-nastrojki-iz-freeradius-cherez-dhcp\/"},"modified":"2019-10-31T21:37:44","modified_gmt":"2019-10-31T18:37:44","slug":"setevye-nastrojki-iz-freeradius-cherez-dhcp","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/setevye-nastrojki-iz-freeradius-cherez-dhcp","title":{"rendered":"Netzwerkeinstellungen von FreeRadius \u00fcber DHCP","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP\" src=\"\/wp-content\/uploads\/2019\/04\/8ca3f3853923337ee5962017fdc611da.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n\u041f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438:<\/p>\n<ul>\n<li>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u0434\u0438\u043c \u2014 \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0435\u0441\u044c \ud83d\ude09<\/li>\n<li>\u0410\u0431\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e DHCP<\/li>\n<li>\u0421\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u0430\u044f. \u042d\u0442\u043e \u0438 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0432\u0438\u0447\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u041e\u043f\u0446\u0438\u0435\u0439 82 \u0438 WiFi \u0431\u0430\u0437\u044b \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043d\u0438 \u043f\u043e\u0434 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u2014 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0434\u0430\u0442\u044c IP \u0438\u0437 \u00ab\u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439\u00bb \u0441\u0435\u0442\u0438<\/li>\n<\/ul>\n<p>\n\u0418\u0437 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e: \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438 <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/server\"   title=\"\u0441\u0435\u0440\u0432\u0435\u0440\" data-wpil-keyword-link=\"linked\">\u0441\u0435\u0440\u0432\u0435\u0440<\/a> \u043d\u0430 FreeBSD, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u00ab\u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\u00bb, \u043d\u043e \u043e\u043d \u00ab\u0437\u0430 \u0442\u0440\u0438\u0434\u0435\u0432\u044f\u0442\u044c \u0437\u0435\u043c\u0435\u043b\u044c\u00bb ;),\u00a0 \u043d\u0435 \u00ab\u043f\u0440\u044f\u043c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0435\u0442\u0438\u00bb. <br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n\u0415\u0449\u0451 \u0435\u0441\u0442\u044c \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e Mikrotik. \u041e\u0431\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0441\u0435\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0430\u044f:<\/p>\n<p><img decoding=\"async\" alt=\"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP\" src=\"\/wp-content\/uploads\/2019\/04\/fd4e960eb21de1c4cb9701147659ddf9.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u0427\u0443\u0442\u044c \u043f\u043e\u0440\u0430\u0437\u043c\u044b\u0448\u043b\u044f\u0432, \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u0434\u0430\u0447\u0438 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c FreeRadius. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0441\u0445\u0435\u043c\u0430 \u043e\u0431\u044b\u0447\u043d\u0430\u044f: \u043d\u0430 Microtick \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c DHCP \u0441\u0435\u0440\u0432\u0435\u0440, \u043d\u0430 \u043d\u0435\u043c-\u0436\u0435 Radius Client. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u00a0 \u0441\u0432\u044f\u0437\u043a\u0443 DHCP server -&gt; Radius Client -&gt; Radius server.<\/p>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e. \u041d\u043e! \u0414\u044c\u044f\u0432\u043e\u043b \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445. \u0410 \u0438\u043c\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\u041f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 PON OLT \u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u043d\u0430 FreeRadius \u00ab\u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442\u00bb \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 User-Name \u0440\u0430\u0432\u043d\u043e\u043c\u0443 \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441\u0443 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438, Agent-Circuit-Id \u0440\u0430\u0432\u043d\u043e\u043c\u0443 \u041c\u0410\u0421 PON Onu \u0438 \u043f\u0443\u0441\u0442\u044b\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c.<\/li>\n<li>\u041f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u043e \u0441\u0432\u0438\u0447\u0435\u0439 \u0441 \u043e\u043f\u0446\u0438\u0435\u0439 82, \u043d\u0430 FreeRadius \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c\u00a0 User-Name \u0440\u0430\u0432\u043d\u043e\u043c\u0443 \u041c\u0410\u0421 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u00a0 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u043c\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430\u043c\u0438 Agent-Circuit-Id \u0438 Agent-Remote-Id \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u041c\u0410\u0421 \u0440\u0435\u043b\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u0432\u0438\u0447\u0430 \u0438 \u043f\u043e\u0440\u0442 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0430\u0431\u043e\u043d\u0435\u043d\u0442.<\/li>\n<li>\u0427\u0430\u0441\u0442\u044c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 WiFI \u0442\u043e\u0447\u0435\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 PAP-CHAP \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b<\/li>\n<li>\u0427\u0430\u0441\u0442\u044c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0441 WIFI \u0442\u043e\u0447\u0435\u043a \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441 User-Name \u0440\u0430\u0432\u043d\u043e\u043c\u0443 \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441\u0443 WIFI \u0442\u043e\u0447\u043a\u0438, \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f.<\/li>\n<\/ul>\n<p>\n\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430: \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u00abOption 82\u00bb \u0443 DHCP<\/p>\n<p>\u042d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 \u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 DHCP \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u043f\u043e\u043b\u044f\u0445 Agent-Circuit-Id\u00a0 \u0438 Agent-Remote-Id. \u041e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441\u0430 \u0440\u0435\u043b\u0435\u0439\u043d\u043e\u0433\u043e \u0441\u0432\u0438\u0447\u0430 \u0438 \u043f\u043e\u0440\u0442\u0430 \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0430\u0431\u043e\u043d\u0435\u043d\u0442. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f PON \u0438\u043b\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0446\u0438\u0439 WIFI \u043f\u043e\u043b\u0435 Agent-Circuit-Id \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0435 \u043d\u0435\u0441\u0451\u0442 (\u043d\u0435\u0442 \u043f\u043e\u0440\u0442\u0430 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430).\u00a0 \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b DHCP \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f:<\/p>\n<p><img decoding=\"async\" alt=\"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP\" src=\"\/wp-content\/uploads\/2019\/04\/e86d80c88c4533e93ec4b1081f702706.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u041f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u044d\u0442\u0430 \u0441\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a:<\/p>\n<ol>\n<li>\u0410\u0431\u043e\u043d\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u043e\u0432\u0435\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 DHCP \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a<\/li>\n<li>\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0432\u0438\u0447, \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0441\u0442\u0430\u043d\u0446\u0438\u044f WiFi \u0438\u043b\u0438 PON) \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u00ab\u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u00bb \u044d\u0442\u043e\u0442 \u043f\u0430\u043a\u0435\u0442 \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0435\u0433\u043e, \u0432\u043d\u0435\u0434\u0440\u044f\u044f \u0432 \u043d\u0435\u0433\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u043f\u0446\u0438\u0438 Option 82 \u0438 Relay agent IP address, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0435\u0433\u043e \u0434\u0430\u043b\u0435\u0435 \u043f\u043e \u0441\u0435\u0442\u0438.<\/li>\n<li>DHCP \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0435\u0433\u043e \u0440\u0435\u043b\u0435\u0439\u043d\u043e\u043c\u0443 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0443<\/li>\n<li>\u0420\u0435\u043b\u0435\u0439\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0430\u043a\u0435\u0442 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/li>\n<\/ol>\n<p>\n\u0422\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043d\u0443\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 FreeRadius<\/h4>\n<p>\n\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 FreeRadius \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0432\u0441\u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u2026 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0441\u0443\u043d\u0435\u0448\u044c\u0441\u044f \u0442\u0443\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 N \u043c\u0435\u0441\u044f\u0446\u0435\u0432 \u00ab\u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u00bb. \u041f\u043e\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043b\u044f FreeRadius \u043d\u0430 Python. \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0431\u0430\u0437\u044b MySQL. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0435\u0451 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u043c\u044b\u0441\u043b\u0430 \u043d\u0435\u0442, \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0435\u0451 \u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u043f\u043e\u0434 \u0441\u0435\u0431\u044f\u00bb. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u044f \u0432\u0437\u044f\u043b \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c sql \u0434\u043b\u044f FreeRadius, \u0438 \u0447\u0443\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u043b, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043f\u043e\u043b\u0435 mac \u0438 port \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430, \u043f\u043e\u043c\u0438\u043c\u043e \u043b\u043e\u0433\u0438\u043d\u0430-\u043f\u0430\u0440\u043e\u043b\u044f.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c FreeRadius:<\/p>\n<pre><code class=\"bash\">cd \/usr\/ports\/net\/freeradius3\nmake config\nmake\ninstall clean\n<\/code><\/pre>\n<p>\n\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043e\u0442\u043c\u0435\u0447\u0430\u0435\u043c \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<p><img decoding=\"async\" alt=\"\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP\" src=\"\/wp-content\/uploads\/2019\/04\/081c5ad448217425fa0043ad6ce3c392.jpg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0438\u043c\u043b\u0438\u043d\u043a \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u044c python (\u0442.\u0435. \u00ab\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u00bb \u0435\u0433\u043e):<\/p>\n<pre><code class=\"bash\">ln -s \/usr\/local\/etc\/raddb\/mods-available\/python \/usr\/local\/etc\/raddb\/mods-enabled<\/code><\/pre>\n<p>\n\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0434\u043b\u044f python \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c:<\/p>\n<pre><code class=\"bash\">pip install mysql-connector<\/code><\/pre>\n<p>\n\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u043e\u0434\u0443\u043b\u044f python \u0434\u043b\u044f FreeRadius, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e python_path. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043c\u0435\u043d\u044f \u044d\u0442\u043e:<\/p>\n<pre><code class=\"bash\">python_path=\"\/usr\/local\/etc\/raddb\/mods-config\/python:\/usr\/local\/lib\/python2.7:\/usr\/local\/lib\/python27.zip:\/usr\/local\/lib\/python2.7:\/usr\/local\/lib\/python2.7\/plat-freebsd12:\/usr\/local\/lib\/python2.7\/lib-tk:\/usr\/local\/lib\/python2.7\/lib-old:\/usr\/local\/lib\/python2.7\/lib-dynload:\/usr\/local\/lib\/python2.7\/site-packages\"\n<\/code><\/pre>\n<p>\n\u041f\u0443\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 python \u0438 \u0432\u0432\u0435\u0434\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b:<\/p>\n<pre><code class=\"bash\">root@phaeton:\/usr\/local\/etc\/raddb\/mods-enabled# python\nPython 2.7.15 (default, Dec  8 2018, 01:22:25) \n[GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags\/RELEASE_601\/final 335540)] on freebsd12\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n&gt;&gt;&gt; import sys\n&gt;&gt;&gt; sys.path\n['', '\/usr\/local\/lib\/python27.zip', '\/usr\/local\/lib\/python2.7', '\/usr\/local\/lib\/python2.7\/plat-freebsd12', '\/usr\/local\/lib\/python2.7\/lib-tk', '\/usr\/local\/lib\/python2.7\/lib-old', '\/usr\/local\/lib\/python2.7\/lib-dynload', '\/usr\/local\/lib\/python2.7\/site-packages']\n&gt;<\/code><\/pre>\n<p>\n\u0415\u0441\u043b\u0438 \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0433, \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 python \u0438 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 FreeRadius \u043d\u0435 \u043d\u0430\u0439\u0434\u0443\u0442 \u0442\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 import. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0441\u043a\u043e\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043c\u043e\u0434\u0443\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0437\u043e\u0432\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0438\u043d\u0433\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">python {\n    python_path=\"\/usr\/local\/etc\/raddb\/mods-config\/python:\/usr\/local\/lib\/python2.7:\/usr\/local\/lib\/python2.7\/site-packages:\/usr\/local\/lib\/python27.zip:\/usr\/local\/lib\/python2.7:\/usr\/local\/lib\/python2.7\/plat-freebsd12:\/usr\/local\/lib\/python2.7\/lib-tk:\/usr\/local\/lib\/python2.7\/lib-old:\/usr\/local\/lib\/python2.7\/lib-dynload:\/usr\/local\/lib\/python2.7\/site-packages\"\n    module = work\n    mod_instantiate = ${.module}\n    mod_detach = ${.module}\n\n    mod_authorize = ${.module}\n    func_authorize = authorize\n\n    mod_authenticate = ${.module}\n    func_authenticate = authenticate\n\n    mod_preacct = ${.module}\n    func_preacct = preacct\n\n    mod_accounting = ${.module}\n    func_accounting = accounting\n\n    mod_checksimul = ${.module}\n    mod_pre_proxy = ${.module}\n    mod_post_proxy = ${.module}\n    mod_post_auth = ${.module}\n    mod_recv_coa = ${.module}\n    mod_send_coa = ${.module}\n\n}<\/code><\/pre>\n<p>\n\u0421\u043a\u0440\u0438\u043f\u0442 work.py (\u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0432 \/usr\/local\/etc\/raddb\/mods-config\/python \u0412\u0441\u0435\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0443 \u043c\u0435\u043d\u044f \u0432\u044b\u0448\u043b\u043e \u0442\u0440\u0438.<\/p>\n<p><b class=\"spoiler_title\">work.py:<\/b><\/p>\n<pre><code class=\"python\">#!\/usr\/local\/bin\/python\n# coding=utf-8\nimport radiusd\nimport func\nimport sys\nfrom pprint import pprint\n\nmysql_host=\"localhost\"\nmysql_username=\"\u0443\u043a\u0430\u0446\u0443\u043a\"\nmysql_password=\"\u044b\u0443\u043a\u0430\u044b\u0443\u043a\u0430\u044b\u0443\u043a\"\nmysql_base=\"\u044b\u0443\u043a\u0430\u044b\u043a\u0443\u0430\u044b\u0443\"\n\ndef instantiate(p):\n  print (\"*** instantiate ***\")\n  print (p)\n  # return 0 for success or -1 for failure\n\ndef authenticate(p):\n    print (\"*** \u0410\u0443\u0442\u0435\u043d\u0444\u0438\u043a\u0430\u0446\u0438\u044f!!***\")\n    print (p)\ndef authorize(p):\n  radiusd.radlog(radiusd.L_INFO, '*** radlog call in authorize ***')    \n  conn=func.GetConnectionMysql(mysql_host, mysql_username, mysql_password, mysql_base);\n  param=func.ConvertArrayToNames(p);\n  pprint(param)\n  print (\"*** \u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f ***\")\n  reply = ()\n  conf = ()\n  cnt=0\n  username=\"\";mac=\"\";\n  # \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \"\u043a\u0430\u043a \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e\", \u043f\u043e \u0441\u0432\u044f\u0437\u043a\u0435 \u043b\u043e\u0433\u0438\u043d\/\u043f\u0430\u0440\u043e\u043b\u044c\n  if (\"User-Name\" in param) and (\"User-Password\" in param) :\n      print (\"\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (1): \u0435\u0441\u0442\u044c \u043b\u043e\u0433\u0438\u043d-\u043f\u0430\u0440\u043e\u043b\u044c\")\n      pprint(param[\"User-Name\"])\n      pprint(param[\"User-Password\"])\n      pprint(conn)\n      print(sys.version_info)\n      print (radiusd.config)\n      sql=\"select radreply.attribute,radreply.value from radcheck inner join radreply on radreply.username=radcheck.username where radcheck.username=%s and radcheck.value=%s\"\n      print(sql)\n      cursor = conn.cursor(dictionary=True,buffered=True)\n      cursor.execute(sql,[param[\"User-Name\"], param[\"User-Password\"]]);\n      row = cursor.fetchone()\t\n      while row is not None:    \n                cnt=cnt+1\n                username=row[\"username\"]\n                reply = reply+((str(row[\"attribute\"]),str(row[\"value\"])), )\n                row = cursor.fetchone()\t          \n # \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0442\u043e User-Name - \u044d\u0442\u043e \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441 \u0411\u0421,\u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u043f\u043e\u0440\u0442\u0430 \u043d\u0435\u0442                \n  if (\"User-Name\" in param)  and (\"User-Password\" in param) and (cnt==0):\n    if param[\"User-Password\"] =='':\n        if \":\" in param[\"User-Name\"]:\n              pprint(param[\"User-Name\"])            \n              print (\"\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (2): User-Name - \u044d\u0442\u043e MAC \u0430\u0434\u0440\u0435\u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438, \u043f\u043e\u0440\u0442\u0430 \u0438 \u043f\u0430\u0440\u043e\u043b\u044f \u043d\u0435\u0442\")\n              sql=\"select radreply.username,radreply.attribute,radreply.value from radcheck inner join radreply on radreply.username=radcheck.username where REPLACE(radcheck.mac,':','') = REPLACE(REPLACE('\"+str(param[\"User-Name\"])+\"','0x',''),':','') and radcheck.sw_port=''\"\n              print (sql)\n              cursor = conn.cursor(dictionary=True,buffered=True)\n              cursor.execute(sql);\n              row = cursor.fetchone()\t\n              while row is not None:                  \n                        cnt=cnt+1\n                        username=row[\"username\"]\n                        mac=param[\"User-Name\"]\n                        reply = reply+((str(row[\"attribute\"]),str(row[\"value\"])), )\n                        row = cursor.fetchone()\t          \n  if (\"Agent-Remote-Id\" in param)  and (\"User-Password\" in param) and (cnt==0):\n    if param[\"User-Password\"] =='':\n              pprint(param[\"Agent-Remote-Id\"])            \n              print (\"\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (2.5): Agent-Remote-Id - \u044d\u0442\u043e MAC \u0430\u0434\u0440\u0435\u0441 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f\")\n              sql=\"select radreply.username,radreply.attribute,radreply.value from radcheck inner join radreply on radreply.username=radcheck.username where REPLACE(radcheck.mac,':','') = REPLACE(REPLACE('\"+str(param[\"Agent-Remote-Id\"])+\"','0x',''),':','') and radcheck.sw_port=''\"\n              print (sql)\n              cursor = conn.cursor(dictionary=True,buffered=True)\n              cursor.execute(sql);\n              row = cursor.fetchone()\t\n              while row is not None:                  \n                        cnt=cnt+1\n                        username=row[\"username\"]\n                        mac=param[\"User-Name\"]\n                        reply = reply+((str(row[\"attribute\"]),str(row[\"value\"])), )\n                        row = cursor.fetchone()\t          \n                        \n#\u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0442\u043e Agent-Remote-Id - \u044d\u0442\u043e \u041c\u0410\u0421 \u0430\u0434\u0440\u0435\u0441 \u0411\u0421,\u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u043f\u043e\u0440\u0442\u0430 \u043d\u0435\u0442 \u0438 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u043f\u043e\u0438\u0441\u043a\u0430 IP \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0435 \u0434\u0430\u043b\u0438                \n  if (\"Agent-Remote-Id\" in param)  and (\"User-Password\" not in param) and (cnt==0):\n          pprint(param[\"Agent-Remote-Id\"])            \n          print (\"\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (3): Agent-Remote-Id - \u041c\u0410\u0421 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438\/\u043f\u043e\u043d. \u041f\u043e\u0440\u0442\u0430 \u0432 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0435 \u043d\u0435\u0442\")\n          sql=\"select radreply.username,radreply.attribute,radreply.value from radcheck inner join radreply on radreply.username=radcheck.username where REPLACE(radcheck.mac,':','') = REPLACE(REPLACE('\"+str(param[\"Agent-Remote-Id\"])+\"','0x',''),':','') and radcheck.sw_port=''\"\n          print(sql)\n          cursor = conn.cursor(dictionary=True,buffered=True)\n          cursor.execute(sql);\n          row = cursor.fetchone()\t\n          while row is not None:    \n                    cnt=cnt+1\n                    mac=param[\"Agent-Remote-Id\"]\n                    username=row[\"username\"]\n                    reply = reply+((str(row[\"attribute\"]),str(row[\"value\"])), )\n                    row = cursor.fetchone()\t          \n#\u0412\u0430\u0440\u0438\u0430\u043d\u0442, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043d\u0435 \u0434\u0430\u043b\u0438, \u043d\u043e \u0435\u0441\u0442\u044c Agent-Remote-Id \u0438 Agent-Circuit-Id\n  if (\"Agent-Remote-Id\" in param)  and (\"Agent-Circuit-Id\" in param) and (cnt==0):\n          pprint(param[\"Agent-Remote-Id\"])            \n          pprint(param[\"Agent-Circuit-Id\"])            \n          print (\"\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 (4): \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e Agent-Remote-Id \u0438 Agent-Circuit-Id, \u0432 \u0431\u0438\u043b\u043b\u0438\u043d\u0433\u0435 \u0435\u0441\u0442\u044c \u043f\u043e\u0440\u0442\/\u043c\u0430\u043a\")\n          sql=\"select radreply.username,radreply.attribute,radreply.value from radcheck inner join radreply on radreply.username=radcheck.username where upper(radcheck.sw_mac)=upper(REPLACE('\"+str(param[\"Agent-Remote-Id\"])+\"','0x','')) and upper(radcheck.sw_port)=upper(RIGHT('\"+str(param[\"Agent-Circuit-Id\"])+\"',2)) and radcheck.sw_port&lt;&gt;''\"\n          print(sql)\n          cursor = conn.cursor(dictionary=True,buffered=True)\n          cursor.execute(sql);\n          row = cursor.fetchone()\t\n          while row is not None:    \n                    cnt=cnt+1\n                    mac=param[\"Agent-Remote-Id\"]\n                    username=row[\"username\"]\n                    reply = reply+((str(row[\"attribute\"]),str(row[\"value\"])), )\n                    row = cursor.fetchone()\t          \n # \u0435\u0441\u043b\u0438 \u0442\u0430\u043a \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 IP \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d, \u0442\u043e \u0432\u044b\u0434\u0430\u044e \u0438\u0435\u0433\u043e \u0438\u0437 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0441\u0435\u0442\u0438..\n  if cnt==0:      \n      print (\"\u041d\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b, \u043f\u043e\u043b\u0443\u0447\u0430\u044e IP \u0438\u0437 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0441\u0435\u0442\u0438..\")\n      ip=func.GetGuestNet(conn)      \n      if ip!=\"\": \n          cnt=cnt+1;\n          reply = reply+((\"Framed-IP-Address\",str(ip)), )\n # \u0435\u0441\u043b\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u0432\u0441\u0451 \u043f\u043b\u043e\u0445\u043e, \u0442\u043e Reject\n  if cnt==0:\n    conf = ( (\"Auth-Type\", \"Reject\"), ) \n  else:\n    #\u0435\u0441\u043b\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u0430\u044f (\u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0430\u0431\u043e\u043d\u0435\u043d\u0442), \u0442\u043e \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438\n    if username!=\"\":\n            func.InsertToHistory(conn,username,mac, reply);\n    conf = ( (\"Auth-Type\", \"Accept\"), )             \n    pprint (reply)\n  conn=None;\n  return radiusd.RLM_MODULE_OK, reply, conf\n\ndef preacct(p):\n  print (\"*** preacct ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef accounting(p):\n  print (\"*** \u0410\u043a\u043a\u0430\u0443\u043d\u0442\u0438\u043d\u0433 ***\")\n  radiusd.radlog(radiusd.L_INFO, '*** radlog call in accounting (0) ***')  \n  print (p)\n  conn=func.GetConnectionMysql(mysql_host, mysql_username, mysql_password, mysql_base);\n  param=func.ConvertArrayToNames(p);\n  pprint(param)  \n  print(\"\u0423\u0434\u0430\u043b\u0438\u043c \u0441\u0442\u0430\u0440\u044b\u0435 \u0441\u0435\u0441\u0441\u0438\u0438 (\u0431\u043e\u043b\u0435\u0435 20 \u043c\u0438\u043d\u0443\u0442 \u043d\u0435\u0442 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0438\u043d\u0433\u0430)\");\n  sql=\"delete from radacct where TIMESTAMPDIFF(minute,acctupdatetime,now())&gt;20\"\n  cursor = conn.cursor(dictionary=True,buffered=True)\n  cursor.execute(sql);\n  conn.commit()\n  print(\"\u041e\u0431\u043d\u043e\u0432\u0438\u043c\/\u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0435\u0441\u0441\u0438\u0438\")\n  if ((\"Acct-Unique-Session-Id\" in param) and (\"User-Name\" in param) and (\"Framed-IP-Address\" in param)):\n      sql='insert into radacct (radacctid,acctuniqueid,username,framedipaddress,acctstarttime) values (null,\"'+str(param['Acct-Unique-Session-Id'])+'\",\"'+str(param['User-Name'])+'\",\"'+str(param['Framed-IP-Address'])+'\",now()) ON DUPLICATE KEY update acctupdatetime=now()'\n      print(sql)\n      cursor = conn.cursor(dictionary=True,buffered=True)\n      cursor.execute(sql)\n      conn.commit()\n  conn=None;\n  return radiusd.RLM_MODULE_OK\n\ndef pre_proxy(p):\n  print (\"*** pre_proxy ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef post_proxy(p):\n  print (\"*** post_proxy ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef post_auth(p):\n  print (\"*** post_auth ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef recv_coa(p):\n  print (\"*** recv_coa ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef send_coa(p):\n  print (\"*** send_coa ***\")\n  print (p)\n  return radiusd.RLM_MODULE_OK\n\ndef detach():\n  print (\"*** \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451 \u0434\u0435\u0442\u0438\u0448\u0435\u0447\u043a\u0438 ***\")\n  return radiusd.RLM_MODULE_OK\n<\/code><\/pre>\n<p><b class=\"spoiler_title\">func.py:<\/b><\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/python2.7\n# coding=utf-8\n\nimport mysql.connector\nfrom mysql.connector import Error\n\n# \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 MySQL\ndef GetConnectionMysql(mysql_host, mysql_username, mysql_password, mysql_base):    \n    try:\n        conn = mysql.connector.connect(host=mysql_host,database=mysql_base,user=mysql_username,password=mysql_password)\n        if conn.is_connected(): print('---c\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0411\u0414 '+mysql_base+' \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e')\n    except Error as e:\n        print(\"\u041e\u0448\u0438\u0431\u043a\u0430: \",e);\n        exit(1);       \n    return conn\n\ndef ConvertArrayToNames(p):\n    mass={};\n    for z in p:\n      mass[z[0]]=z[1]\n    return mass\n# \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c\ndef InsertToHistory(conn,username,mac, reply):\n    print(\"--\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e \u0434\u043b\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438\")\n    repl=ConvertArrayToNames(reply)\n    if \"Framed-IP-Address\" in repl:\n        sql='insert into radpostauth (username,reply,authdate,ip,mac,session_id,comment) values (\"'+username+'\",\"Access-Accept\",now(),\"'+str(repl[\"Framed-IP-Address\"])+'\",\"'+str(mac)+'\",\"\",\"\")'\n        print(sql)\n        cursor = conn.cursor(dictionary=True,buffered=True)          \n        cursor.execute(sql);\n        conn.commit()\n# \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0434\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e \u0434\u0430\u0442\u0435 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0430\u0434\u0440\u0435\u0441 \u0438\u0437 \u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439 \u0441\u0435\u0442\u0438        \ndef GetGuestNet(conn):\n    ip=\"\";id=0\n    sql=\"select * from guestnet order by dt limit 1\"\n    print (sql)\n    cursor = conn.cursor(dictionary=True,buffered=True)          \n    cursor.execute(sql);\n    row = cursor.fetchone()\t\n    while row is not None:    \n            ip=row[\"ip\"]\n            id=row[\"id\"]\n            row = cursor.fetchone()\t          \n    if id&gt;0:\n        sql=\"update guestnet set dt=now() where id=\"+str(id)\n        print (sql)\n        cursor = conn.cursor(dictionary=True,buffered=True)          \n        cursor.execute(sql);\n        conn.commit()\n    return ip         <\/code><\/pre>\n<p><b class=\"spoiler_title\">radiusd.py:<\/b><\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/python2.7\n# coding=utf-8\n\n# from modules.h\n\nRLM_MODULE_REJECT = 0\nRLM_MODULE_FAIL = 1\nRLM_MODULE_OK = 2\nRLM_MODULE_HANDLED = 3\nRLM_MODULE_INVALID = 4\nRLM_MODULE_USERLOCK = 5\nRLM_MODULE_NOTFOUND = 6\nRLM_MODULE_NOOP = 7\nRLM_MODULE_UPDATED = 8\nRLM_MODULE_NUMCODES = 9\n\n# from log.h\nL_AUTH = 2\nL_INFO = 3\nL_ERR = 4\nL_WARN = 5\nL_PROXY = 6\nL_ACCT = 7\n\nL_DBG = 16\nL_DBG_WARN = 17\nL_DBG_ERR = 18\nL_DBG_WARN_REQ = 19\nL_DBG_ERR_REQ = 20\n\n# log function\ndef radlog(level, msg):\n    import sys\n    sys.stdout.write(msg + 'n')\n    level = level\n<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u043a\u043e\u0434\u0443, \u043c\u044b \u0432\u0441\u0435\u043c\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430 \u043f\u043e \u0435\u0433\u043e \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0441\u043a\u0438\u043c MAC \u0430\u0434\u0440\u0435\u0441\u0430\u043c \u0438\u043b\u0438 \u0441\u0432\u044f\u0437\u043a\u0435 Option 82, \u0438 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0442\u043e \u0432\u044b\u0434\u0430\u0435\u043c \u0441\u0430\u043c\u044b\u0439 \u0441\u0442\u0430\u0440\u044b\u0439 \u0438\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u0433\u0434\u0430 \u043b\u0438\u0431\u043e IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u0437 \u00ab\u0433\u043e\u0441\u0442\u0435\u0432\u043e\u0439\u00bb \u0441\u0435\u0442\u0438. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 default \u0432 \u043f\u0430\u043f\u043a\u0435 sites-enabled, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0443\u0436\u043d\u044b\u0435 \u0444\u0443\u043a\u0446\u0438\u0438 \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 python \u0434\u0435\u0440\u0433\u0430\u043b\u0438\u0441\u044c \u0432 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0444\u0430\u0439\u043b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u0432\u0438\u0434\u0443:<\/p>\n<p><b class=\"spoiler_title\">default<\/b><\/p>\n<pre><code class=\"bash\">server default {\nlisten {\n    type = auth\n    ipaddr = *\n    port = 0\n    limit {\n          max_connections = 16\n          lifetime = 0\n          idle_timeout = 30\n    }\n}\nlisten {\n    ipaddr = *\n    port = 0\n    type = acct\n    limit {\n    }\n}\n\nlisten {\n    type = auth\n    port = 0\n    limit {\n          max_connections = 1600\n          lifetime = 0\n          idle_timeout = 30\n    }\n}\n\nlisten {\n    ipv6addr = ::\n    port = 0\n    type = acct\n    limit {\n    }\n}\n\nauthorize {\n    python\n    filter_username\n    preprocess\n    expiration\n    logintime\n}\n\nauthenticate {\n    Auth-Type PAP {\n\tpap\n\tpython\n    }\n    Auth-Type CHAP {\n\tchap\n\tpython\n    }\n    Auth-Type MS-CHAP {\n\tmschap\n\tpython\n    }\n    eap\n}\n\n\npreacct {\n    preprocess\n    acct_unique\n    suffix\n    files\n}\n\naccounting {\n    python\n    exec\n    attr_filter.accounting_response\n}\n\nsession {\n\n}\n\npost-auth {\n    update {\n\t&amp;reply: += &amp;session-state:\n    }\n    exec\n    remove_reply_message_if_eap\n    Post-Auth-Type REJECT {\nattr_filter.access_reject\n\teap\nremove_reply_message_if_eap\n    }\n    Post-Auth-Type Challenge {\n    }\n}\n\npre-proxy {\n}\n\npost-proxy {\n    eap\n}\n}\n<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0442\u043e \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442 \u0432 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u044b\u0439 \u043b\u043e\u0433:<\/p>\n<pre><code class=\"bash\">\/usr\/local\/etc\/rc.d\/radiusd debug<\/code><\/pre>\n<p>\n\u0427\u0442\u043e \u0435\u0449\u0435. \u041f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 FreeRadius \u0443\u0434\u043e\u0431\u043d\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b radclient. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f:<\/p>\n<pre><code class=\"bash\">echo \"User-Name=4C:5E:0C:2E:7F:15,Agent-Remote-Id=0x9845623a8c98,Agent-Circuit-Id=0x00010006\" | radclient -x  127.0.0.1:1812 auth testing123<\/code><\/pre>\n<p>\n\u0418\u043b\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0438\u043d\u0433:<\/p>\n<pre><code class=\"bash\">echo \"User-Name=4C:5E:0C:2E:7F:15,Agent-Remote-Id=0x00030f26054a,Agent-Circuit-Id=0x00010002\" | radclient -x  127.0.0.1:1813 acct testing123<\/code><\/pre>\n<p>\n\u0425\u043e\u0447\u0443 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u00ab\u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439\u00bb \u0432 \u00ab\u043f\u0440\u043e\u043c\u044b\u0448\u043b\u0435\u043d\u043d\u044b\u0445\u00bb \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u043d\u0443 \u043d\u0438\u043a\u0430\u043a \u043d\u0435\u043b\u044c\u0437\u044f. \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0431\u0440\u043e\u0441\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430:<\/p>\n<ul>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u00ab\u043f\u043e\u0434\u0434\u0435\u043b\u043a\u0430\u00bb MAC \u0430\u0434\u0440\u0435\u0441\u0430. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0443 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0431\u0435 \u0447\u0443\u0436\u043e\u0439 MAC \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b<\/li>\n<li>\u043b\u043e\u0433\u0438\u043a\u0430 \u0432\u044b\u0434\u0430\u0447\u0438 \u0433\u043e\u0441\u0442\u0435\u0432\u044b\u0445 \u0441\u0435\u0442\u0435\u0439 \u043d\u0438\u0436\u0435 \u0432\u0441\u044f\u043a\u043e\u0439 \u043a\u0440\u0438\u0442\u0438\u043a\u0438. \u041d\u0435\u0442 \u0434\u0430\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u00ab\u0443 \u043c\u043e\u0436\u0435\u0442 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u0441 \u0432\u044b\u0434\u0430\u043d\u043d\u044b\u043c \u0442\u0430\u043a\u0438\u043c IP \u0430\u0434\u0440\u0435\u0441\u043e\u043c?\u00bb<\/li>\n<\/ul>\n<p>\n\u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00ab\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435\u00bb, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0432 \u043c\u043e\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e. \u041d\u0435 \u0441\u0443\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \ud83d\ude09<br \/>\n<br \/>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/446586\/\">habr.com<\/a><\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u0434\u0438\u043c \u2014 \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0435\u0441\u044c \ud83d\ude09 \u0410\u0431\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e DHCP \u0421\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u0430\u044f. \u042d\u0442\u043e \u0438 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0432\u0438\u0447\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u041e\u043f\u0446\u0438\u0435\u0439 82 \u0438 WiFi \u0431\u0430\u0437\u044b \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0415\u0441\u043b\u0438 \u043d\u0438 \u043f\u043e\u0434 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u2014 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":22825,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-30841","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u0434\u0438\u043c \u2014 \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0435\u0441\u044c ;) \u0410\u0431\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e DHCP \u0421\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u0430\u044f. \u042d\u0442\u043e \u0438 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0432\u0438\u0447\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u041e\u043f\u0446\u0438\u0435\u0439 82 \u0438 WiFi \u0431\u0430\u0437\u044b \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0415\u0441\u043b\u0438 \u043d\u0438 \u043f\u043e\u0434 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u2014\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/setevye-nastrojki-iz-freeradius-cherez-dhcp\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u0434\u0438\u043c \u2014 \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0435\u0441\u044c ;) \u0410\u0431\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e DHCP \u0421\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u0430\u044f. \u042d\u0442\u043e \u0438 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0432\u0438\u0447\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u041e\u043f\u0446\u0438\u0435\u0439 82 \u0438 WiFi \u0431\u0430\u0437\u044b \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0415\u0441\u043b\u0438 \u043d\u0438 \u043f\u043e\u0434 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u2014\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/setevye-nastrojki-iz-freeradius-cherez-dhcp\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:37:44+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:37:44+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Netzwerkeinstellungen aus FreeRadius \u00fcber DHCP | ProHoster","description":"Die Aufgabe besteht darin, die Vergabe von IP-Adressen an die Kunden zu organisieren. Die Bedingungen sind: Einen separaten Server f\u00fcr die Authentifizierung stellen wir nicht zur Verf\u00fcgung \u2013 Sie m\u00fcssen damit zurechtkommen ;) Die Kunden sollen ihre Netzwerkeinstellungen \u00fcber DHCP erhalten. Das Netzwerk ist heterogen. Es handelt sich sowohl um PON-Ausr\u00fcstung als auch um normale Switches mit konfiguriertem Option 82 und WiFi-Basen mit Access Points. Wenn keine der Bedingungen f\u00fcr die IP-Vergabe erf\u00fcllt ist \u2013","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/setevye-nastrojki-iz-freeradius-cherez-dhcp","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0421\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u0437 FreeRadius \u0447\u0435\u0440\u0435\u0437 DHCP | ProHoster","og:description":"\u041f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0430\u043b\u0430\u0434\u0438\u0442\u044c \u0432\u044b\u0434\u0430\u0447\u0443 IP \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0430\u0431\u043e\u043d\u0435\u043d\u0442\u0430\u043c. \u0423\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438: \u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u043e\u0434 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u0434\u0430\u0434\u0438\u043c \u2014 \u043e\u0431\u043e\u0439\u0434\u0435\u0442\u0435\u0441\u044c ;) \u0410\u0431\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e DHCP \u0421\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0440\u043e\u0434\u043d\u0430\u044f. \u042d\u0442\u043e \u0438 PON \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0432\u0438\u0447\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u041e\u043f\u0446\u0438\u0435\u0439 82 \u0438 WiFi \u0431\u0430\u0437\u044b \u0441 \u0442\u043e\u0447\u043a\u0430\u043c\u0438 \u0415\u0441\u043b\u0438 \u043d\u0438 \u043f\u043e\u0434 \u043e\u0434\u043d\u043e \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0432\u044b\u0434\u0430\u0447\u0438 IP \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u2014","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/setevye-nastrojki-iz-freeradius-cherez-dhcp","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:37:44+00:00","article:modified_time":"2019-10-31T18:37:44+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"30841","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 03:14:20","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 03:28:46","updated":"2026-01-21 03:14:20"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/30841","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=30841"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/30841\/revisions"}],"predecessor-version":[{"id":172799,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/30841\/revisions\/172799"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/22825"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=30841"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=30841"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=30841"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}