CryptodevATECCx08 Auth/en: различия между версиями

Новая страница: «Getting messages from the "test" topic on the example.com server»
(Новая страница: «Next, create a client configuration file on the controller: client.ovpn: <pre> ------------------------------------------------------------------------- client de…»)
(Новая страница: «Getting messages from the "test" topic on the example.com server»)
 
(не показано 10 промежуточных версий этого же участника)
Строка 360: Строка 360:
Note the line group i2c. It is necessary to work with the crypto device.
Note the line group i2c. It is necessary to work with the crypto device.


После этого запускаем клиента:
Then run the client:


<pre>
<pre>
Строка 366: Строка 366:
</pre>
</pre>


Если все хорошо, то в системе должен появиться интерфейс tun0 с адресом из подсети 10.8.0.0/24:
If all is well, then the system should appear tun0 interface with the address from the subnet 10.8.0.0/24:


<pre>
<pre>
Строка 379: Строка 379:
</pre>
</pre>


Для проверки работоспособности запускаем ping:
To check the performance run ping:


<pre>
<pre>
Строка 388: Строка 388:
</pre>
</pre>


== Настройка mosquitto ==
== Mosquitto settings ==


UPD:
UPD:
Строка 468: Строка 468:




Генерируем приватный ключ и запрос на сертификат:
Generate a private key and certificate request:


<pre>
<pre>
Строка 480: Строка 480:
</pre>
</pre>


Копируем файлы '''ca.crt''', '''mosquitto.crt''', '''mosquitto.key''' на сервер и редактируем файл конфигурации '''/etc/mosquitto/conf.d/server.conf'''
Copy the file '''ca.crt''', '''mosquitto.crt''', '''mosquitto.key''' to the server and edit the configuration file '''/etc/mosquito/conf.d/server.conf'''


<pre>
<pre>
Строка 490: Строка 490:
</pre>
</pre>


Запускаем серис:
Start service:
<pre>
<pre>
service mosquitto start
service mosquitto start
</pre>
</pre>


Также, если требуется, можно сделать чтобы локальный mosquitto сервер на контроллере
Also, if required, you can make the local mosquitto server on the controller
форвардил некоторые топики на удаленный сервер. Для этого создаем файл бриджа: '''/etc/mosquitto/bridge.conf'''
forwarder some topics on a remote server. To do this, create a bridge file: '''/etc/mosquitto/bridge.conf'''


<pre>
<pre>
Строка 508: Строка 508:
</pre>
</pre>


После перезапуска локального сервиса mosquitto топики /test/.. будут отправлятся на удаленный сервер example.com
After restarting the local service mosquito topics /test/.. will be sent to the remote server example.com
по защищенному ssl каналу.
secure ssl channel.


Примеры клиентских команд mosquitto.
Examples of client mosquitto commands.
Отправка сообщения "message" в топик "test" на сервере example.com  
Sending a message to the "test" topic on the  example.com server


<pre>
<pre>
Строка 518: Строка 518:
</pre>
</pre>


Получение сообщений из топика "test" на сервере example.com
Getting messages from the "test" topic on the example.com server


<pre>
<pre>
mosquitto_sub -h example.com --cert device_AP6V5MDG.crt --key 'engine:ateccx08:ATECCx08:00:04:C0:00' -t "test" --cafile ca.crt
mosquitto_sub -h example.com --cert device_AP6V5MDG.crt --key 'engine:ateccx08:ATECCx08:00:04:C0:00' -t "test" --cafile ca.crt
</pre>
</pre>
12 063

правки