{"id":923,"date":"2020-04-11T19:52:19","date_gmt":"2020-04-11T17:52:19","guid":{"rendered":"https:\/\/blog.mhasin.eu\/?p=923"},"modified":"2020-11-21T20:54:03","modified_gmt":"2020-11-21T19:54:03","slug":"freeradius-dhcp-sql-static-leases","status":"publish","type":"post","link":"https:\/\/blog.mhasin.eu\/?p=923","title":{"rendered":"freeradius DHCP SQL static leases"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Instalacia serveru:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install freeradius freeradius-mysql freeradius-dhcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Vytvorenie datab\u00e1zy pre mysql DHCP<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Potrebne tabulky:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>radcheck \u2013 overenie MAC<\/li><li>radreply \u2013 definovanie parametrov MAC<\/li><li>postauth \u2013 LOG ak zariadenie dostalo IP <\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u0161trukt\u00fara a pr\u00edklad radcheck:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"832\" height=\"97\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-20.png\" alt=\"\" class=\"wp-image-924\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-20.png 832w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-20-300x35.png 300w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-20-768x90.png 768w\" sizes=\"auto, (max-width: 832px) 100vw, 832px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"267\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-21.png\" alt=\"\" class=\"wp-image-925\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-21.png 615w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-21-300x130.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0161trukt\u00fara a pr\u00edklad radreply:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"602\" height=\"264\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-22.png\" alt=\"\" class=\"wp-image-926\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-22.png 602w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-22-300x132.png 300w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"216\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-23.png\" alt=\"\" class=\"wp-image-927\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-23.png 676w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-23-300x96.png 300w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u0161trukt\u00fara a pr\u00edklad radposauth:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"775\" height=\"228\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-24.png\" alt=\"\" class=\"wp-image-928\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-24.png 775w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-24-300x88.png 300w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-24-768x226.png 768w\" sizes=\"auto, (max-width: 775px) 100vw, 775px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"321\" src=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-25.png\" alt=\"\" class=\"wp-image-929\" srcset=\"https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-25.png 636w, https:\/\/blog.mhasin.eu\/wp-content\/uploads\/2020\/04\/obr\u00e1zok-25-300x151.png 300w\" sizes=\"auto, (max-width: 636px) 100vw, 636px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Vytvorenie tabuliek LMS VALA:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">POSTAUTH:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE `wifi_dhcp_radpostauth` (\n  `id` int(11) NOT NULL,\n  `username` varchar(64) NOT NULL DEFAULT '',\n  `pass` varchar(64) NOT NULL DEFAULT '',\n  `reply` varchar(32) NOT NULL DEFAULT '',\n  `authdate` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\n\n--\n-- K\u013e\u00fa\u010de pre exportovan\u00e9 tabu\u013eky\n--\n\n--\n-- Indexy pre tabu\u013eku `radpostauth`\n--\nALTER TABLE `radpostauth`\n  ADD PRIMARY KEY (`id`);\n\n--\n-- AUTO_INCREMENT pre exportovan\u00e9 tabu\u013eky\n--\n\n--\n-- AUTO_INCREMENT pre tabu\u013eku `radpostauth`\n--\nALTER TABLE `radpostauth`\n  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nastavenie TRIGER pre update hodnot v tabulke nodes s casom kedy posledny krat dostal IP. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\nCREATE or replace TRIGGER J5_dhcp_radpostauth_triger\nAFTER INSERT ON J5_dhcp_radpostauth FOR EACH ROW\n\n\nupdate nodestest set lastonline = UNIX_TIMESTAMP(NEW.authdate) where mac = NEW.username  and NEW.reply != '';\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">RADCHECK (WIFI):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticwifi_radcheck` as\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'Cleartext-Password' AS attribute, ':=' as op, '' as value from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi !='0' and nodes.mac_wifi != ''<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nova verzia 1.11.2020<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticwifi_radcheck` as\nselect UUID() as 'id', `nodes`.`mac_wifi` AS `username`, 'Cleartext-Password' AS attribute, ':=' as op, '' as value from `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr_wifi` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">RADREPLY  (WIFI):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticwifi_radreply` as\n\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'DHCP-Subnet-Mask' AS attribute, ':=' as op, (select networks.mask from networks where networks.`net1`= substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3) ) as value from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi != '' and nodes.mac_wifi !='0'\nunion\n\n\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'DHCP-Router-Address' AS attribute, ':=' as op, (select networks.wifi_gateway from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi != '' and nodes.mac_wifi !='0'\nunion\n\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'DHCP-Domain-Name-Server' AS attribute, ':=' as op, (select networks.dns from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi != '' and nodes.mac_wifi !='0'\nunion\n\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'DHCP-Domain-Name-Server' AS attribute, ':=' as op, (select networks.dns2 from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr_wifi`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi != '' and nodes.mac_wifi !='0'\n\n\nunion\nselect UUID() as 'id', `nodes`.`mac_wifi`  AS `username`, 'DHCP-Your-IP-Address' AS attribute, ':=' as op, INET_NTOA(`nodes`.`ipaddr_wifi`) AS `value` from `nodes` where `nodes`.`access` = 1 and `nodes`.`wifi` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr_wifi`),'.',1) = 192 and nodes.mac_wifi != '' and nodes.mac_wifi !='0'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nova verzia 1.11.2020<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticwifi_radreply` as\nselect uuid() AS `id`,\n`nodes`.`mac_wifi` AS `username`,\n'DHCP-Subnet-Mask' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`mask` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac_wifi` AS `username`,\n'DHCP-Router-Address' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`wifi_gateway` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr_wifi` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac_wifi` AS `username`,\n'DHCP-Domain-Name-Server' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`dns` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr_wifi` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac_wifi` AS `username`,\n'DHCP-Domain-Name-Server' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`dns2` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr_wifi` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n\nunion \n\n\nselect uuid() AS `id`,\n`nodes`.`mac_wifi` AS `username`,\n'DHCP-Your-IP-Address' AS `attribute`,\n':=' AS `op`,\n\ninet_ntoa(`nodes`.`ipaddr_wifi`)  as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr_wifi` = `networks`.`address_wifi`) = 1 and nodes.mac_wifi != '0' and nodes.mac_wifi != ''\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">RADCHECK (CABLE):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticBN_radcheck` as\nselect UUID() as 'id', `nodes`.`mac` AS `username`, 'Cleartext-Password' AS attribute, ':=' as op, '' as value from `nodes` where `nodes`.`access` = 1 and `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5 <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nova verzia select 27.10.2020:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\ncreate or replace view v_staticPO_radcheck as\nselect UUID() as 'id', `nodes`.`mac` AS `username`, 'Cleartext-Password' AS attribute, ':=' as op, '' as value from `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 <\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RADREPLAY (CABLE):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE or replace VIEW `v_staticBN_radreply` as\n\nselect UUID() as 'id', `nodes`.`mac`  AS `username`, 'DHCP-Subnet-Mask' AS attribute, ':=' as op, (select networks.mask from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3) ) as value from `nodes` where `nodes`.`access` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5\nunion\n\n\nselect UUID() as 'id', `nodes`.`mac`  AS `username`, 'DHCP-Router-Address' AS attribute, ':=' as op, (select networks.gateway from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5\nunion\n\nselect UUID() as 'id', `nodes`.`mac`  AS `username`, 'DHCP-Domain-Name-Server' AS attribute, ':=' as op, (select networks.dns from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5\nunion\n\nselect UUID() as 'id', `nodes`.`mac`  AS `username`, 'DHCP-Domain-Name-Server' AS attribute, ':=' as op, (select networks.dns2 from networks where networks.`net1` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3) or networks.`net2` = substr(inet_ntoa(`nodes`.`ipaddr`),9,3)) as value from `nodes` where `nodes`.`access` = 1 and `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5\n\n\nunion\nselect UUID() as 'id', `nodes`.`mac`  AS `username`, 'DHCP-Your-IP-Address' AS attribute, ':=' as op, INET_NTOA(`nodes`.`ipaddr`) AS `value` from `nodes` where `nodes`.`access` = 1 and  `SPLIT_STRING`(inet_ntoa(`nodes`.`ipaddr`),'.',1) = 147 and (select `customers`.`seq_servis_zona` AS `seq_servis_zona` from `customers` where `customers`.`id` = `nodes`.`ownerid` and `customers`.`deleted` = 0 and (select `passwd`.`expdate` from `passwd` where `customers`.`id` = `passwd`.`ownerid` limit 1) > unix_timestamp()) = 5<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nova verzia 27.10.2020<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create or replace view v_staticPO_radreply as\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Subnet-Mask' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`mask` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Router-Address' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`gateway` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Domain-Name-Server' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`dns` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Domain-Name-Server' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`dns2` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Domain-Name-Server' AS `attribute`,\n':=' AS `op`,\n\n`networks`.`dns` as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\nunion \n\nselect uuid() AS `id`,\n`nodes`.`mac` AS `username`,\n'DHCP-Your-IP-Address' AS `attribute`,\n':=' AS `op`,\n\ninet_ntoa(`nodes`.`ipaddr`)  as `value` \n\nfrom `nodes`\n\ninner join networks on \n((-1 << (33 - INSTR(BIN(INET_ATON(networks.mask)), \"0\"))) &\n       `nodes`.`ipaddr` = `networks`.`address`) = 1 and (networks.seq_servis_zona = 8 or networks.seq_servis_zona = 9)\n\ninner join passwd on passwd.ownerid = nodes.ownerid and passwd.`expdate` > unix_timestamp()\n\nwhere `nodes`.`access` = 1 \n\n\n\n\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Nastavenie freeradius:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>vytvorenie query_dhcp.conf<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/freeradius\/3.0\/mods-config\/sql\/main\/mysql\/\ncp queries.conf queries_dhcp.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">V s\u00fabore queries_dhcp.conf upravi\u0165 premenn\u00fa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sql_user_name = \"%{DHCP-Client-Hardware-Address}\"\ngroup_membership_query = \"SELECT 1 from ${postauth_table}\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. vytvorenie SQL connection modul<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/freeradius\/3.0\/mods-available\/\ncp sql sqldhcp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">V s\u00fabore sqldhcp je potrebne nastavi\u0165 parametre k datab\u00e1ze a pr\u00edslu\u0161ne tabu\u013eky<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Na konci s\u00faboru je potrebne includnut spr\u00e1vny query file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$INCLUDE ${modconfdir}\/${.:name}\/main\/${dialect}\/queries_dhcp.conf\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Zmena nastaveni:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>read_groups = no\nread_profiles = no<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. vytvorenie virtual server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/etc\/freeradius\/3.0\/sites-available\/\nnano wifi-dhcp<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>    server dhcp {\n        listen {\n            type = dhcp\n            ipaddr = 147.232.191.233\n            port = 67\n            interface = ens192\n            broadcast = no\n        }\n        dhcp DHCP-Discover {\n            update reply {\n                DHCP-Message-Type = DHCP-Offer\n            }\n\n            update reply {\n                #DHCP-Domain-Name-Server = 0.0.0.0\n                DHCP-IP-Address-Lease-Time = 3600\n                DHCP-DHCP-Server-Identifier = 192.168.10.1\n            }\n\n            sql_dhcp.authorize\n            sql_dhcp.post-auth\n            linelog-dhcp\n            ok\n        }\n\n        dhcp DHCP-Request {\n            update reply {\n                DHCP-Message-Type = DHCP-Ack\n            }\n\n            update reply {\n                #DHCP-Domain-Name-Server = 0.0.0.0\n                DHCP-IP-Address-Lease-Time = 3600\n                DHCP-DHCP-Server-Identifier = 192.168.10.1\n            }\n\n            sql_dhcp.authorize\n            sql_dhcp.post-auth\n            linelog-dhcp\n            ok\n        }\n\n        dhcp {\n            sql_dhcp.post-auth\n            linelog-dhcp\n            reject\n        }\n    }\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u00daprava LOG do MYSQL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/freeradius\/3.0\/mods-config\/sql\/main\/mysql\/queries_dhcp.conf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">V \u201epost-auth {\u201c query pozmeni\u0165 premenn\u00fa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>'%{reply:Packet-Type}', \\\n\nzmenit na:\n\n'%{reply:DHCP-Your-IP-Address}', \\\n\n\n\ngroup_membership_query = \"SELECT id from ${postauth_table} where id =1\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Nastavenie modulu linelog<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>linelog linelog-dhcp {\n    filename = ${logdir}\/linelog-dhcp.log\n    format = \"\"\n    reference = \"%{%{reply:DHCP-Message-Type}:-%{request:DHCP-Message-Type}}\"\n    DHCP-Discover = \"%S --> Transaction-ID: %{DHCP-Transaction-Id} DISCOVER: [%{DHCP-Client-Hardware-Address}] via (%{DHCP-Gateway-IP-Address}), hop count = %{DHCP-Hop-Count}, Relay = %{DHCP-Relay-Remote-Id}, Hostname =  %{DHCP-Hostname}\"\n    DHCP-Offer = \"%S <-- Transaction-ID: %{DHCP-Transaction-Id} OFFER: %{reply:DHCP-Your-IP-Address} to [%{DHCP-Client-Hardware-Address}] ...\"\n    DHCP-Request = \"%S --> Transaction-ID: %{DHCP-Transaction-Id} REQUEST: [%{DHCP-Client-Hardware-Address}] via (%{DHCP-Gateway-IP-Address}), hop count = %{DHCP-Hop-Count}, Relay = %{DHCP-Relay-Remote-Id} ...\"\n    DHCP-Ack = \"%S <-- Transaction-ID: %{DHCP-Transaction-Id} ACK: %{reply:DHCP-Your-IP-Address} to [%{DHCP-Client-Hardware-Address}] ...\"\n    DHCP-NAK = \"%S <-- Transaction-ID: %{DHCP-Transaction-Id} NAK: [%{DHCP-Client-Hardware-Address}] for %{request:DHCP-Client-IP-Address}; ...\"\n    0 = \"%S -\/- Transaction-ID: %{DHCP-Transaction-Id} %{request:DHCP-Message-Type} DROPPED: ...\"\n}<\/code><\/pre>\n<div class=\"pdf24Plugin-cp\"> \t<form name=\"pdf24Form0\" method=\"post\" action=\"https:\/\/doc2pdf.pdf24.org\/wordpress.php\" target=\"pdf24PopWin\" onsubmit=\"var pdf24Win = window.open('about:blank', 'pdf24PopWin', 'resizable=yes,scrollbars=yes,width=600,height=250,left='+(screen.width\/2-300)+',top='+(screen.height\/3-125)+''); pdf24Win.focus(); if(typeof pdf24OnCreatePDF === 'function'){void(pdf24OnCreatePDF(this,pdf24Win));}\"> \t\t<input type=\"hidden\" name=\"blogCharset\" value=\"Cw1x07UAAA==\" \/><input type=\"hidden\" name=\"blogPosts\" value=\"MwQA\" \/><input type=\"hidden\" name=\"blogUrl\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLQUA\" \/><input type=\"hidden\" name=\"blogName\" value=\"c\/LxdwcA\" \/><input type=\"hidden\" name=\"blogValueEncoding\" value=\"gzdeflate base64\" \/><input type=\"hidden\" name=\"postId_0\" value=\"szQyBgA=\" \/><input type=\"hidden\" name=\"postTitle_0\" value=\"SytKTS1KTMksLVZw8XAOUAgO9FEoLkksyUxWyElNLE4tBgA=\" \/><input type=\"hidden\" name=\"postLink_0\" value=\"yygpKSi20tdPyslP18vNSCzOzNNLLdW3L7C1NDIGAA==\" \/><input type=\"hidden\" name=\"postAuthor_0\" value=\"y00syfcwNAIA\" \/><input type=\"hidden\" name=\"postDateTime_0\" value=\"MzIwMtA1MNE1NFQwtLQyMLEytAQA\" \/><input type=\"hidden\" name=\"postContent_0\" value=\"7VzddtpIEr7XU9QymTGcg\/gRNv7F5xCMYzYYGMDJZs\/ugbbUxhqEpOgHG\/vwCPsCe5eLvdiLfYFczI1n3murWwKEjW1hcOLx4MQJUld3V9f3VXW1GrWwZ4KsEdvORS5M8VQz5K5oEot0LGKeR\/ZLuu0QjcgqAZtafWq5O3tJc1\/Anz3ToneqyoZCI\/t77L99Yjqg8voanFmUWkRRXTvwUewN7M\/BMlE5l829JK+N3VjU7+ghDT8MnL5hUV2loBCHnN58uRoAU81r\/OCoUJto\/FBDNcOx6KlOARtxte5gMlBXu1NPU20Hx6mp+6i5fE7lLvz0w5aUTu+CgVbi6hznC3tJlPClLGpqg7GUQs9U3egTJsiU6FHHMvpTdUwDbec65+M65eo7IF24IpZKFG\/ETEQzoFQDr1rS1UIM9fcvjuV2nZuvFgGCxrr5X1cjCoyGshPOYGOpM7XjzuCC2iMdCrZ6RUWNWB3GC7XXAc1ArPVOLqKRq0EEDYFw82tiD3Q5Aheq4pznIlsZKQLnVO2cO7nI9mYEbEvORc4dx7R3kknsoZPonRNb1RP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YuQD7weNmUhnt9jjtfRDI2FxnbseC8CGpV7R2cUsRotMZqqYvR6uGR3xDiuMrjCjwwlgdYp+j8guB6+83F2h9TxoXS+lA4v+gsH+lgsPhWf5Ds3Nv1maQ\/hRh4oBx58wIwg\/KfCoOmcSt3jOxo5nlKTdsVXhmt9J7fpzsGlc4Sz3xNRt7cdr76y1GpG71OGeM1yLwz8Egbfq4OS5IwhjsVlLKV9eeDyrw0XB7LTO33Ngi4h0RHj6cRw8o3NHXAttBV9+iqM+u9l876e1b66xjGcsQbkEfvAkDatH2HwUiQger8\/YSZ2ynxFPWTAYqIY7IivjMW9G6dBrbXoqYy02QBT3oWkR3SY8nxVLBzvgp95Tt5UhHJQaheqHYn0H6bSd3n0kQf8n5icEor7UO+85dhBxXJaeGwiK4epsxL7gkWGKBXZrGIc61chgUsQv8d+e4VCmUByOkAG+YSf1vVvBIfPp1h8vWzmLYtghVw8P2XgfZC44RkiDJBKJgFajKWpuHOrFn0+KjeZLgeHWsHCufJKp84X3z2ToSv79kzTCemFtjH4LtxzQFw7ovzvRKzVCPRlam4f8Gw7q1VqtiJV5D8Pp4Pd\/\" \/> \t\t<a href=\"https:\/\/www.pdf24.org\" target=\"_blank\" title=\"www.pdf24.org\" rel=\"nofollow\"><img src=\"https:\/\/blog.mhasin.eu\/wp-content\/plugins\/pdf24-post-to-pdf\/img\/pdf_32x32.png\" alt=\"\" border=\"0\" height=\"32\" \/><\/a> \t\t<span class=\"pdf24Plugin-cp-space\">\u00a0\u00a0<\/span> \t\t<span class=\"pdf24Plugin-cp-text\">Send article as PDF<\/span> \t\t<span class=\"pdf24Plugin-cp-space\">\u00a0\u00a0<\/span> \t\t<input class=\"pdf24Plugin-cp-input\" style=\"margin: 0px;\" type=\"text\" name=\"sendEmailTo\" placeholder=\"Enter email address\" \/> \t\t<input class=\"pdf24Plugin-cp-submit\" style=\"margin: 0px;\" type=\"submit\" value=\"Send\" \/> \t<\/form> <\/div>","protected":false},"excerpt":{"rendered":"Instalacia serveru: Vytvorenie datab\u00e1zy pre mysql DHCP Potrebne tabulky: radcheck \u2013 overenie MAC radreply \u2013 definovanie parametrov MAC postauth \u2013 LOG ak zariadenie dostalo IP \u0161trukt\u00fara a pr\u00edklad radcheck: \u0161trukt\u00fara a pr\u00edklad radreply: \u0161trukt\u00fara a pr\u00edklad radposauth: Vytvorenie tabuliek LMS VALA: POSTAUTH: Nastavenie TRIGER pre update hodnot v tabulke nodes s casom kedy posledny krat dostal IP. RADCHECK (WIFI): Nova verzia 1.11.2020 RADREPLY (WIFI): Nova verzia 1.11.2020 RADCHECK (CABLE): Nova verzia select 27.10.2020: RADREPLAY (CABLE):&hellip;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"arc_restricted_post":false,"footnotes":""},"categories":[13,4],"tags":[],"class_list":["post-923","post","type-post","status-publish","format-standard","hentry","category-freeradius","category-linux"],"_links":{"self":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/923","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=923"}],"version-history":[{"count":19,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions"}],"predecessor-version":[{"id":1751,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=\/wp\/v2\/posts\/923\/revisions\/1751"}],"wp:attachment":[{"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhasin.eu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}