Guest User

Untitled

a guest
Oct 4th, 2024
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.19 KB | None | 0 0
  1. [
  2. {
  3. "id": "4d5b1b3eb1517a78",
  4. "type": "tab",
  5. "label": "Beispiele socat per NodeRed steuern ",
  6. "disabled": false,
  7. "info": "",
  8. "env": []
  9. },
  10. {
  11. "id": "876dee6ba2d35660",
  12. "type": "exec",
  13. "z": "4d5b1b3eb1517a78",
  14. "command": "nslookup <DynDNS Fritzbox> 8.8.8.8 | grep Address | sed '/2a/!d' | cut -f2 -d\" \"",
  15. "addpay": "",
  16. "append": "",
  17. "useSpawn": "false",
  18. "timer": "",
  19. "winHide": false,
  20. "oldrc": false,
  21. "name": "DNS Abfrage 8.8.8.8 <DynDNS Fritzbox> (anpassen)",
  22. "x": 400,
  23. "y": 160,
  24. "wires": [
  25. [
  26. "11beb8016d0b5e26"
  27. ],
  28. [],
  29. []
  30. ]
  31. },
  32. {
  33. "id": "cac41083a5adb355",
  34. "type": "inject",
  35. "z": "4d5b1b3eb1517a78",
  36. "name": "Stimmt DNS Eintrag mit DynDNS Adresse überein?",
  37. "props": [
  38. {
  39. "p": "payload"
  40. },
  41. {
  42. "p": "topic",
  43. "vt": "str"
  44. }
  45. ],
  46. "repeat": "",
  47. "crontab": "",
  48. "once": false,
  49. "onceDelay": 0.1,
  50. "topic": "",
  51. "payload": "",
  52. "payloadType": "date",
  53. "x": 230,
  54. "y": 60,
  55. "wires": [
  56. [
  57. "876dee6ba2d35660"
  58. ]
  59. ]
  60. },
  61. {
  62. "id": "8c914d77f76f3f6e",
  63. "type": "exec",
  64. "z": "4d5b1b3eb1517a78",
  65. "command": " ping -c 1 <DynDNS Fritzbox> | grep 64 | cut -f4 -d\" \"",
  66. "addpay": "",
  67. "append": "",
  68. "useSpawn": "false",
  69. "timer": "",
  70. "winHide": false,
  71. "oldrc": false,
  72. "name": "anpassen",
  73. "x": 360,
  74. "y": 320,
  75. "wires": [
  76. [
  77. "0e14328f0895e5fd"
  78. ],
  79. [],
  80. []
  81. ]
  82. },
  83. {
  84. "id": "0e14328f0895e5fd",
  85. "type": "string",
  86. "z": "4d5b1b3eb1517a78",
  87. "name": "",
  88. "methods": [
  89. {
  90. "name": "trim",
  91. "params": []
  92. },
  93. {
  94. "name": "delRightMost",
  95. "params": [
  96. {
  97. "type": "str",
  98. "value": ":"
  99. }
  100. ]
  101. }
  102. ],
  103. "prop": "payload",
  104. "propout": "payload",
  105. "object": "msg",
  106. "objectout": "msg",
  107. "x": 710,
  108. "y": 340,
  109. "wires": [
  110. [
  111. "131976dd082b3dce"
  112. ]
  113. ]
  114. },
  115. {
  116. "id": "11beb8016d0b5e26",
  117. "type": "change",
  118. "z": "4d5b1b3eb1517a78",
  119. "name": "",
  120. "rules": [
  121. {
  122. "t": "move",
  123. "p": "payload",
  124. "pt": "msg",
  125. "to": "payload.dns",
  126. "tot": "msg"
  127. }
  128. ],
  129. "action": "",
  130. "property": "",
  131. "from": "",
  132. "to": "",
  133. "reg": false,
  134. "x": 760,
  135. "y": 140,
  136. "wires": [
  137. [
  138. "e6f0ce50c00330dc"
  139. ]
  140. ]
  141. },
  142. {
  143. "id": "131976dd082b3dce",
  144. "type": "change",
  145. "z": "4d5b1b3eb1517a78",
  146. "name": "",
  147. "rules": [
  148. {
  149. "t": "move",
  150. "p": "payload",
  151. "pt": "msg",
  152. "to": "payload.ping",
  153. "tot": "msg"
  154. }
  155. ],
  156. "action": "",
  157. "property": "",
  158. "from": "",
  159. "to": "",
  160. "reg": false,
  161. "x": 920,
  162. "y": 340,
  163. "wires": [
  164. [
  165. "ed5c4e8d1225733f",
  166. "11965dd6ecbde4fe"
  167. ]
  168. ]
  169. },
  170. {
  171. "id": "e6f0ce50c00330dc",
  172. "type": "string",
  173. "z": "4d5b1b3eb1517a78",
  174. "name": "",
  175. "methods": [
  176. {
  177. "name": "trim",
  178. "params": []
  179. },
  180. {
  181. "name": "toString",
  182. "params": []
  183. }
  184. ],
  185. "prop": "payload.dns",
  186. "propout": "payload.dns",
  187. "object": "msg",
  188. "objectout": "msg",
  189. "x": 970,
  190. "y": 140,
  191. "wires": [
  192. [
  193. "1f4a0ff1dfa845f5",
  194. "8c914d77f76f3f6e"
  195. ]
  196. ]
  197. },
  198. {
  199. "id": "1f4a0ff1dfa845f5",
  200. "type": "persist in",
  201. "z": "4d5b1b3eb1517a78",
  202. "name": "dns",
  203. "storageNode": "0b7396de8c7b10ea",
  204. "x": 1150,
  205. "y": 140,
  206. "wires": []
  207. },
  208. {
  209. "id": "11965dd6ecbde4fe",
  210. "type": "persist out",
  211. "z": "4d5b1b3eb1517a78",
  212. "name": "dns",
  213. "storageNode": "0b7396de8c7b10ea",
  214. "x": 1130,
  215. "y": 280,
  216. "wires": [
  217. [
  218. "ed5c4e8d1225733f"
  219. ]
  220. ]
  221. },
  222. {
  223. "id": "ed5c4e8d1225733f",
  224. "type": "join",
  225. "z": "4d5b1b3eb1517a78",
  226. "name": "",
  227. "mode": "custom",
  228. "build": "merged",
  229. "property": "payload",
  230. "propertyType": "msg",
  231. "key": "topic",
  232. "joiner": "\\n",
  233. "joinerType": "str",
  234. "useparts": false,
  235. "accumulate": true,
  236. "timeout": "",
  237. "count": "2",
  238. "reduceRight": false,
  239. "reduceExp": "",
  240. "reduceInit": "",
  241. "reduceInitType": "",
  242. "reduceFixup": "",
  243. "x": 1270,
  244. "y": 340,
  245. "wires": [
  246. [
  247. "a840f80d2f87193a"
  248. ]
  249. ]
  250. },
  251. {
  252. "id": "5ba5fd2de3382e1b",
  253. "type": "debug",
  254. "z": "4d5b1b3eb1517a78",
  255. "name": "Adressen identisch",
  256. "active": true,
  257. "tosidebar": true,
  258. "console": false,
  259. "tostatus": false,
  260. "complete": "true",
  261. "targetType": "full",
  262. "statusVal": "",
  263. "statusType": "auto",
  264. "x": 1890,
  265. "y": 300,
  266. "wires": []
  267. },
  268. {
  269. "id": "a840f80d2f87193a",
  270. "type": "switch",
  271. "z": "4d5b1b3eb1517a78",
  272. "name": "",
  273. "property": "payload.dns",
  274. "propertyType": "msg",
  275. "rules": [
  276. {
  277. "t": "eq",
  278. "v": "payload.ping",
  279. "vt": "msg"
  280. },
  281. {
  282. "t": "neq",
  283. "v": "payload.ping",
  284. "vt": "msg"
  285. }
  286. ],
  287. "checkall": "true",
  288. "repair": false,
  289. "outputs": 2,
  290. "x": 1470,
  291. "y": 340,
  292. "wires": [
  293. [
  294. "73682970992de318"
  295. ],
  296. [
  297. "ab8e91c439e145bc"
  298. ]
  299. ]
  300. },
  301. {
  302. "id": "61bdc285efd8d6aa",
  303. "type": "debug",
  304. "z": "4d5b1b3eb1517a78",
  305. "name": "Adressen nicht identisch",
  306. "active": true,
  307. "tosidebar": true,
  308. "console": false,
  309. "tostatus": false,
  310. "complete": "true",
  311. "targetType": "full",
  312. "statusVal": "",
  313. "statusType": "auto",
  314. "x": 1910,
  315. "y": 380,
  316. "wires": []
  317. },
  318. {
  319. "id": "73682970992de318",
  320. "type": "delay",
  321. "z": "4d5b1b3eb1517a78",
  322. "name": "",
  323. "pauseType": "rate",
  324. "timeout": "5",
  325. "timeoutUnits": "seconds",
  326. "rate": "1",
  327. "nbRateUnits": "10",
  328. "rateUnits": "second",
  329. "randomFirst": "1",
  330. "randomLast": "5",
  331. "randomUnits": "seconds",
  332. "drop": true,
  333. "allowrate": false,
  334. "outputs": 1,
  335. "x": 1650,
  336. "y": 300,
  337. "wires": [
  338. [
  339. "5ba5fd2de3382e1b"
  340. ]
  341. ]
  342. },
  343. {
  344. "id": "ab8e91c439e145bc",
  345. "type": "delay",
  346. "z": "4d5b1b3eb1517a78",
  347. "name": "",
  348. "pauseType": "rate",
  349. "timeout": "5",
  350. "timeoutUnits": "seconds",
  351. "rate": "1",
  352. "nbRateUnits": "10",
  353. "rateUnits": "second",
  354. "randomFirst": "1",
  355. "randomLast": "5",
  356. "randomUnits": "seconds",
  357. "drop": true,
  358. "allowrate": false,
  359. "outputs": 1,
  360. "x": 1650,
  361. "y": 380,
  362. "wires": [
  363. [
  364. "61bdc285efd8d6aa"
  365. ]
  366. ]
  367. },
  368. {
  369. "id": "5633222dd0518f66",
  370. "type": "exec",
  371. "z": "4d5b1b3eb1517a78",
  372. "command": "ss | grep <Wireguardport>",
  373. "addpay": "",
  374. "append": "",
  375. "useSpawn": "false",
  376. "timer": "",
  377. "winHide": false,
  378. "oldrc": false,
  379. "name": "anpassen",
  380. "x": 460,
  381. "y": 640,
  382. "wires": [
  383. [
  384. "866be17aabd72bb2"
  385. ],
  386. [],
  387. [
  388. "c4cbb2f39d591359"
  389. ]
  390. ]
  391. },
  392. {
  393. "id": "1dd18e8d20d47eb9",
  394. "type": "inject",
  395. "z": "4d5b1b3eb1517a78",
  396. "name": "Welche externe IPv4 ist mit der Weiterleitung verbunden?",
  397. "props": [
  398. {
  399. "p": "payload"
  400. },
  401. {
  402. "p": "topic",
  403. "vt": "str"
  404. }
  405. ],
  406. "repeat": "",
  407. "crontab": "",
  408. "once": false,
  409. "onceDelay": 0.1,
  410. "topic": "",
  411. "payload": "",
  412. "payloadType": "date",
  413. "x": 270,
  414. "y": 540,
  415. "wires": [
  416. [
  417. "5633222dd0518f66"
  418. ]
  419. ]
  420. },
  421. {
  422. "id": "866be17aabd72bb2",
  423. "type": "debug",
  424. "z": "4d5b1b3eb1517a78",
  425. "name": "debug 22",
  426. "active": true,
  427. "tosidebar": true,
  428. "console": false,
  429. "tostatus": false,
  430. "complete": "payload",
  431. "targetType": "msg",
  432. "statusVal": "",
  433. "statusType": "auto",
  434. "x": 900,
  435. "y": 620,
  436. "wires": []
  437. },
  438. {
  439. "id": "c4cbb2f39d591359",
  440. "type": "switch",
  441. "z": "4d5b1b3eb1517a78",
  442. "name": "",
  443. "property": "payload.code",
  444. "propertyType": "msg",
  445. "rules": [
  446. {
  447. "t": "eq",
  448. "v": "0",
  449. "vt": "num"
  450. },
  451. {
  452. "t": "eq",
  453. "v": "1",
  454. "vt": "num"
  455. }
  456. ],
  457. "checkall": "true",
  458. "repair": false,
  459. "outputs": 2,
  460. "x": 710,
  461. "y": 700,
  462. "wires": [
  463. [
  464. "976a74b6c5ca1686"
  465. ],
  466. [
  467. "0f82f97f65912977"
  468. ]
  469. ]
  470. },
  471. {
  472. "id": "d10a60c5aeca5896",
  473. "type": "exec",
  474. "z": "4d5b1b3eb1517a78",
  475. "command": "ps -e | grep socat",
  476. "addpay": "",
  477. "append": "",
  478. "useSpawn": "false",
  479. "timer": "",
  480. "winHide": false,
  481. "oldrc": false,
  482. "name": "",
  483. "x": 1450,
  484. "y": 620,
  485. "wires": [
  486. [
  487. "f7a17d871374e112"
  488. ],
  489. [],
  490. []
  491. ]
  492. },
  493. {
  494. "id": "c6f5ef6e407708ad",
  495. "type": "inject",
  496. "z": "4d5b1b3eb1517a78",
  497. "name": "Wieviele socatinstanzen laufen?",
  498. "props": [
  499. {
  500. "p": "payload"
  501. },
  502. {
  503. "p": "topic",
  504. "vt": "str"
  505. }
  506. ],
  507. "repeat": "",
  508. "crontab": "",
  509. "once": false,
  510. "onceDelay": 0.1,
  511. "topic": "",
  512. "payload": "",
  513. "payloadType": "date",
  514. "x": 1210,
  515. "y": 500,
  516. "wires": [
  517. [
  518. "d10a60c5aeca5896"
  519. ]
  520. ]
  521. },
  522. {
  523. "id": "976a74b6c5ca1686",
  524. "type": "debug",
  525. "z": "4d5b1b3eb1517a78",
  526. "name": "debug 23",
  527. "active": true,
  528. "tosidebar": true,
  529. "console": false,
  530. "tostatus": false,
  531. "complete": "true",
  532. "targetType": "full",
  533. "statusVal": "",
  534. "statusType": "auto",
  535. "x": 920,
  536. "y": 680,
  537. "wires": []
  538. },
  539. {
  540. "id": "0f82f97f65912977",
  541. "type": "debug",
  542. "z": "4d5b1b3eb1517a78",
  543. "name": "debug 24",
  544. "active": true,
  545. "tosidebar": true,
  546. "console": false,
  547. "tostatus": false,
  548. "complete": "true",
  549. "targetType": "full",
  550. "statusVal": "",
  551. "statusType": "auto",
  552. "x": 920,
  553. "y": 720,
  554. "wires": []
  555. },
  556. {
  557. "id": "f7a17d871374e112",
  558. "type": "debug",
  559. "z": "4d5b1b3eb1517a78",
  560. "name": "debug 25",
  561. "active": true,
  562. "tosidebar": true,
  563. "console": false,
  564. "tostatus": false,
  565. "complete": "true",
  566. "targetType": "full",
  567. "statusVal": "",
  568. "statusType": "auto",
  569. "x": 1660,
  570. "y": 600,
  571. "wires": []
  572. },
  573. {
  574. "id": "e9d78837d3b0c9da",
  575. "type": "exec",
  576. "z": "4d5b1b3eb1517a78",
  577. "command": "",
  578. "addpay": "payload",
  579. "append": "",
  580. "useSpawn": "true",
  581. "timer": "",
  582. "winHide": false,
  583. "oldrc": false,
  584. "name": "",
  585. "x": 1610,
  586. "y": 740,
  587. "wires": [
  588. [
  589. "7ec7c921f85e56e3"
  590. ],
  591. [
  592. "28adc4ff04072698"
  593. ],
  594. [
  595. "5c2b31536a6964e4"
  596. ]
  597. ]
  598. },
  599. {
  600. "id": "7ec7c921f85e56e3",
  601. "type": "debug",
  602. "z": "4d5b1b3eb1517a78",
  603. "name": "debug 26",
  604. "active": true,
  605. "tosidebar": true,
  606. "console": false,
  607. "tostatus": false,
  608. "complete": "false",
  609. "statusVal": "",
  610. "statusType": "auto",
  611. "x": 1860,
  612. "y": 720,
  613. "wires": []
  614. },
  615. {
  616. "id": "488c9cf0f75de5d9",
  617. "type": "inject",
  618. "z": "4d5b1b3eb1517a78",
  619. "name": "socat stop",
  620. "props": [
  621. {
  622. "p": "payload"
  623. },
  624. {
  625. "p": "topic",
  626. "vt": "str"
  627. }
  628. ],
  629. "repeat": "",
  630. "crontab": "",
  631. "once": false,
  632. "onceDelay": 0.1,
  633. "topic": "",
  634. "payload": "killall -9 socat",
  635. "payloadType": "str",
  636. "x": 1220,
  637. "y": 780,
  638. "wires": [
  639. [
  640. "e9d78837d3b0c9da"
  641. ]
  642. ]
  643. },
  644. {
  645. "id": "086d1081f65d72c6",
  646. "type": "inject",
  647. "z": "4d5b1b3eb1517a78",
  648. "name": "socat start UDP <Wireguardport> anpassen",
  649. "props": [
  650. {
  651. "p": "payload"
  652. },
  653. {
  654. "p": "topic",
  655. "vt": "str"
  656. }
  657. ],
  658. "repeat": "",
  659. "crontab": "",
  660. "once": false,
  661. "onceDelay": 0.1,
  662. "topic": "",
  663. "payload": "socat UDP4-LISTEN:<Wireguardport>,fork,reuseaddr UDP6:[IPv6 der Fritzbox]:<Wireguardport>",
  664. "payloadType": "str",
  665. "x": 1310,
  666. "y": 720,
  667. "wires": [
  668. [
  669. "e9d78837d3b0c9da"
  670. ]
  671. ]
  672. },
  673. {
  674. "id": "28adc4ff04072698",
  675. "type": "debug",
  676. "z": "4d5b1b3eb1517a78",
  677. "name": "debug 27",
  678. "active": true,
  679. "tosidebar": true,
  680. "console": false,
  681. "tostatus": false,
  682. "complete": "false",
  683. "statusVal": "",
  684. "statusType": "auto",
  685. "x": 1860,
  686. "y": 760,
  687. "wires": []
  688. },
  689. {
  690. "id": "5c2b31536a6964e4",
  691. "type": "debug",
  692. "z": "4d5b1b3eb1517a78",
  693. "name": "debug 28",
  694. "active": true,
  695. "tosidebar": true,
  696. "console": false,
  697. "tostatus": false,
  698. "complete": "false",
  699. "statusVal": "",
  700. "statusType": "auto",
  701. "x": 1860,
  702. "y": 800,
  703. "wires": []
  704. },
  705. {
  706. "id": "3b9efd9110859db1",
  707. "type": "exec",
  708. "z": "4d5b1b3eb1517a78",
  709. "command": "ip addr show <z,B, ens6 muss angepasst werden> | grep inet",
  710. "addpay": "",
  711. "append": "",
  712. "useSpawn": "false",
  713. "timer": "",
  714. "winHide": false,
  715. "oldrc": false,
  716. "name": "Name der Netzwerkkarte muss angepasst werden (z.B. \"eth0\", \"ens6\" etc)",
  717. "x": 640,
  718. "y": 880,
  719. "wires": [
  720. [
  721. "3677de3b8bd5cb58"
  722. ],
  723. [],
  724. []
  725. ]
  726. },
  727. {
  728. "id": "3677de3b8bd5cb58",
  729. "type": "debug",
  730. "z": "4d5b1b3eb1517a78",
  731. "name": "debug 29",
  732. "active": true,
  733. "tosidebar": true,
  734. "console": false,
  735. "tostatus": false,
  736. "complete": "true",
  737. "targetType": "full",
  738. "statusVal": "",
  739. "statusType": "auto",
  740. "x": 1180,
  741. "y": 880,
  742. "wires": []
  743. },
  744. {
  745. "id": "5e1b950bc36fcccf",
  746. "type": "inject",
  747. "z": "4d5b1b3eb1517a78",
  748. "name": "IP Adressen vServer abfragen",
  749. "props": [
  750. {
  751. "p": "payload"
  752. },
  753. {
  754. "p": "topic",
  755. "vt": "str"
  756. }
  757. ],
  758. "repeat": "",
  759. "crontab": "",
  760. "once": false,
  761. "onceDelay": 0.1,
  762. "topic": "",
  763. "payload": "",
  764. "payloadType": "date",
  765. "x": 180,
  766. "y": 880,
  767. "wires": [
  768. [
  769. "3b9efd9110859db1"
  770. ]
  771. ]
  772. },
  773. {
  774. "id": "0b7396de8c7b10ea",
  775. "type": "persist-store",
  776. "filename": "dns.json",
  777. "interval": "60"
  778. }
  779. ]
Advertisement
Add Comment
Please, Sign In to add comment