http://arduino.esp8266.com/stable/package_esp8266com_index.json
Установка и автозапуск node-red
1 2 |
curl -sL https://deb.nodesource.com/setup_6.x | bash - apt-get install -y nodejs |
1 |
npm install -g --unsafe-perm node-red |
1 |
nano /etc/systemd/system/node-red.service |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[Unit] Description=Node-RED After=syslog.target network.target [Service] ExecStart=/usr/bin/node-red Restart=on-failure KillSignal=SIGINT SyslogIdentifier=node-red StandardOutput=syslog StandardError=syslog WorkingDirectory=/root/.node-red User=root #Group=root [Install] WantedBy=multi-user.target |
1 2 |
systemctl enable node-red systemctl start node-red |
Настройка пересылки DNS запросов в Mikrotik
1 2 3 4 |
/ip firewall layer7-protocol add name=domain.com regexp=domain.com /ip firewall mangle add chain=prerouting dst-address=192.168.1.1 layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=tcp dst-port=53 /ip firewall mangle add chain=prerouting dst-address=192.168.1.1 layer7-protocol=domain.com action=mark-connection new-connection-mark=domain.com-forward protocol=udp dst-port=53 /ip firewall nat add action=dst-nat chain=dstnat connection-mark=domain.com-forward to-addresses=10.0.0.1 |