Testimielessä ajattelin pystyttää RADIUS-palvelimen, jotta palvelimiin ja verkkolaitteisiin pääsisi kirjatumaan yhdellä käyttäjällä ilman, että tarvittaessa mikäli passua vaihtaa, ei tarvitse samaa entryä tehdä joka laitteeseen erikseen.
Tosissaan kun MikroTikiin koittaa kirjautua sisään RADIUS-käyttäjällä, SSH palauttaa "Permission denied, please try again". Olen tarkistanut, että MikroTik pystyy kommunikoimaan RADIUS-palvelimen kanssa:
FreeRADIUS konffiin määritetty client seuraavasti:
Radius asetukset MikroTikin päädyssä:
AAA asetukset MikroTikin päädyssä:
Logi liittyen RADIUS-kirjautumiseen:
Ideoita otetaan vastaan mistä lähtisi selvittämään kerta yhteyden pitäisi MikroTikin ja RADIUS-palvelimen välillä pitäisi olla ?OK?
Tosissaan kun MikroTikiin koittaa kirjautua sisään RADIUS-käyttäjällä, SSH palauttaa "Permission denied, please try again". Olen tarkistanut, että MikroTik pystyy kommunikoimaan RADIUS-palvelimen kanssa:
Koodi:
Traceroute
[@NEPTRT01] > tool traceroute 10.10.1.198 port=1812
Columns: ADDRESS, LOSS, SENT, LAST, AVG, BEST, WORST, STD-DEV
# ADDRESS LOSS SENT LAST AVG BEST WORST STD-DEV
1 10.10.1.198 0% 27 0.5ms 2 0.5 14.2 2.8
[@NEPTRT01] >
Koodi:
radius monitor ennen uutta kirjautumis yritystä:
[@NEPTRT01] /radius> monitor 0
pending: 0
requests: 31
accepts: 0
rejects: 0
resends: 60
timeouts: 31
bad-replies: 0
last-request-rtt: 0ms
-- [Q quit|D dump|C-z pause]
radius monitor uuden kirjautumis yrityksen jälkeen:
[@NEPTRT01] /radius> monitor 0
pending: 0
requests: 33
accepts: 0
rejects: 0
resends: 66
timeouts: 33
bad-replies: 0
last-request-rtt: 0ms
-- [Q quit|D dump|C-z pause]
FreeRADIUS konffiin määritetty client seuraavasti:
Koodi:
client neptrt01.aohman.ovh {
ipaddr = 10.10.1.1
secret = RouterBoard123
}
Radius asetukset MikroTikin päädyssä:
Koodi:
[@NEPTRT01] /radius> pr
Columns: SERVICE, ADDRESS, SECRET
# SERVICE ADDRESS SECRET
0 login 10.10.1.198 RouterBoard123
[@NEPTRT01] /radius>
AAA asetukset MikroTikin päädyssä:
Koodi:
[@NEPTRT01] /radius> .. user aaa pr
use-radius: yes
accounting: yes
interim-update: 0s
default-group: read
exclude-groups:
[@NEPTRT01] /radius>
Logi liittyen RADIUS-kirjautumiseen:
17:02:28 radius,debug new request 0d:02 code=Access-Request service=login
17:02:28 radius,debug sending 0d:02 to 10.10.1.198:1812
17:02:28 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:28 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:28 radius,debug,packet Service-Type = 1
17:02:28 radius,debug,packet User-Name = "antohman"
17:02:28 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:28 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:28 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:28 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:28 radius,debug,packet a6b5
17:02:28 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:28 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:28 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug resending 0d:02
17:02:29 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:29 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:29 radius,debug,packet Service-Type = 1
17:02:29 radius,debug,packet User-Name = "antohman"
17:02:29 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:29 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:29 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:29 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:29 radius,debug,packet a6b5
17:02:29 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:29 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:29 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug resending 0d:02
17:02:29 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:29 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:29 radius,debug,packet Service-Type = 1
17:02:29 radius,debug,packet User-Name = "antohman"
17:02:29 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:29 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:29 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:29 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:29 radius,debug,packet a6b5
17:02:29 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:29 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:29 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug timeout for 0d:02
17:02:35 radius,debug new request 0d:03 code=Access-Request service=login
17:02:35 radius,debug sending 0d:03 to 10.10.1.198:1812
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug resending 0d:03
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug resending 0d:03
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug timeout for 0d:03
17:02:35 system,error,critical login failure for user antohman from 10.10.1.188 via ssh
17:02:28 radius,debug sending 0d:02 to 10.10.1.198:1812
17:02:28 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:28 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:28 radius,debug,packet Service-Type = 1
17:02:28 radius,debug,packet User-Name = "antohman"
17:02:28 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:28 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:28 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:28 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:28 radius,debug,packet a6b5
17:02:28 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:28 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:28 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug resending 0d:02
17:02:29 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:29 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:29 radius,debug,packet Service-Type = 1
17:02:29 radius,debug,packet User-Name = "antohman"
17:02:29 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:29 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:29 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:29 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:29 radius,debug,packet a6b5
17:02:29 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:29 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:29 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug resending 0d:02
17:02:29 radius,debug,packet sending Access-Request with id 33 to 10.10.1.198:1812
17:02:29 radius,debug,packet Signature = 0xfc1ab20f73672f7ec26911b66a6a6025
17:02:29 radius,debug,packet Service-Type = 1
17:02:29 radius,debug,packet User-Name = "antohman"
17:02:29 radius,debug,packet MS-CHAP-Challenge = 0xedcb0d09dbebaf8ad5654dad7cd51b52
17:02:29 radius,debug,packet MS-CHAP2-Response = 0x00004e26285b0519d462d4c27c378841
17:02:29 radius,debug,packet e49f000000000000000077c680d27b4c
17:02:29 radius,debug,packet 2892017689490e3909c9c2cf77e4ab3d
17:02:29 radius,debug,packet a6b5
17:02:29 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:29 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:29 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:29 radius,debug timeout for 0d:02
17:02:35 radius,debug new request 0d:03 code=Access-Request service=login
17:02:35 radius,debug sending 0d:03 to 10.10.1.198:1812
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug resending 0d:03
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug resending 0d:03
17:02:35 radius,debug,packet sending Access-Request with id 34 to 10.10.1.198:1812
17:02:35 radius,debug,packet Signature = 0x71cd5329900c20b71e9283aec3926aef
17:02:35 radius,debug,packet Service-Type = 1
17:02:35 radius,debug,packet User-Name = "antohman"
17:02:35 radius,debug,packet MS-CHAP-Challenge = 0xc8b1242d3cdd44654d3a666444380fd7
17:02:35 radius,debug,packet MS-CHAP2-Response = 0x000086abe140bb2298fb3bd16f45caeb
17:02:35 radius,debug,packet da3c0000000000000000cf9f1f5c2afa
17:02:35 radius,debug,packet 3fb0dc4c020581936cf64b053ef92269
17:02:35 radius,debug,packet 65f9
17:02:35 radius,debug,packet Calling-Station-Id = "10.10.1.188"
17:02:35 radius,debug,packet NAS-Identifier = "NEPTRT01"
17:02:35 radius,debug,packet NAS-IP-Address = 10.10.1.193
17:02:35 radius,debug timeout for 0d:03
17:02:35 system,error,critical login failure for user antohman from 10.10.1.188 via ssh
Ideoita otetaan vastaan mistä lähtisi selvittämään kerta yhteyden pitäisi MikroTikin ja RADIUS-palvelimen välillä pitäisi olla ?OK?