https://www.ionos.de/server/vps
Server kaufen. 1€ im Monat
Ubuntu installieren
Im Kontrollcenter:
ipv6 aktivieren/erstellen
Firewall Ports freigeben 8081, 8082, u.s.w. Wie gebraucht für iobroker
Fritzbox:
Heimnetzübersicht-Netzwerkeinstellungen
IP-Adressen
IPv6-Adressen
DHCPv6-Server im Heimnetz
DHCPv6-Server in der FRITZ!Box für das Heimnetz aktivieren: anhaken
DNS-Server, Präfix (IA_PD) und IPv6-Adresse (IA_NA) zuweisen: anhaken
Fritzbox Portfreigabe für Raspi
für ipv6 8081(-8335)
alle Ports die man braucht
Weiter mit Server:
sudo apt install 6tunnel
sudo apt install ufw
sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 8081
und alle anderen Ports die man braucht
sudo ufw enable
3a02:360:53ed:1300:5221:43ef:4f57:f3ca= raspi IPv6 Adresse
6tunnel 8081 3a02:360:53ed:1300:5221:43ef:4f57:f3ca 8081
und alle anderen ports
1 port = auf was der Server horchen soll 2 port= welcher port angesteuert werden soll vom Raspi
IPdesServers:8081 ist iobroker
ps -ef | grep 6tunnel
kill
- #!/usr/bin/expect -f
- # Expect script to supply root/admin password for remote ssh server
- # and execute command.
- # This script needs three argument to(s) connect to remote server:
- # password = Password of remote UNIX server, for root user.
- # ipaddr = IP Addreess of remote UNIX server, no hostname
- # scriptname = Path to remote script which will execute on remote server
- # For example:
- # ./sshlogin.exp password 192.168.1.11 who
- # ------------------------------------------------------------------------
- # Copyright (c) 2004 nixCraft project <http://cyberciti.biz/fb/>
- # This script is licensed under GNU GPL version 2.0 or above
- # -------------------------------------------------------------------------
- # This script is part of nixCraft shell script collection (NSSC)
- # Visit http://bash.cyberciti.biz/ for more information.
- # ----------------------------------------------------------------------
- # set Variables
- set password [lrange $argv 0 0]
- set ipaddr [lrange $argv 1 1]
- set scriptname [lrange $argv 2 2]
- set arg1 [lrange $argv 3 8]
- set timeout -1
- # now connect to remote UNIX box (ipaddr) with given script to execute
- spawn ssh root@$ipaddr $scriptname $arg1
- match_max 100000
- # Look for passwod prompt
- expect "*?assword:*"
- # Send password aka $password
- send -- "$password\r"
- # send blank line (\r) to make sure we get back to gui
- send -- "\r"
- expect eof
sudo apt install expect
/opt/iobroker/iobroker-data/files/0_userdata.0/sshlogin.exp
Adapter
Shell-Konsole XTerm
ssh root@ipServer
mit yes bestätigen..
exec blockly
- <xml xmlns="https://developers.google.com/blockly/xml">
- <variables>
- <variable type="timeout" id="timeout">timeout</variable>
- </variables>
- <block type="on" id="9!$1BouVZ|Bkj${(?P0x" x="113" y="-138">
- <field name="OID">tr-064.0.states.externalIPv6</field>
- <field name="CONDITION">ne</field>
- <field name="ACK_CONDITION"></field>
- <statement name="STATEMENT">
- <block type="debug" id="g5Vo{zBtmWy8dlM$E2O;">
- <field name="Severity">error</field>
- <value name="TEXT">
- <shadow type="text" id="o|jZe?CesnkZ3`O(g8!i">
- <field name="TEXT">info neustart</field>
- </shadow>
- </value>
- <next>
- <block type="control" id="Ls^x0VEOV%Y)wGulr-%?">
- <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
- <field name="OID">system.adapter.info.0.alive</field>
- <field name="WITH_DELAY">FALSE</field>
- <value name="VALUE">
- <block type="logic_boolean" id="FN6`ztg%6NSFR~hvANt9">
- <field name="BOOL">FALSE</field>
- </block>
- </value>
- <next>
- <block type="control" id=";p,Qz{xomm(PGktll@K?">
- <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
- <field name="OID">system.adapter.info.0.alive</field>
- <field name="WITH_DELAY">TRUE</field>
- <field name="DELAY_MS">1</field>
- <field name="UNIT">min</field>
- <field name="CLEAR_RUNNING">TRUE</field>
- <value name="VALUE">
- <block type="logic_boolean" id="A}Y_QNbGEGYIH%.NiUql">
- <field name="BOOL">TRUE</field>
- </block>
- </value>
- </block>
- </next>
- </block>
- </next>
- </block>
- </statement>
- <next>
- <block type="on" id="kay=Acr]h^4fhcminLnN">
- <field name="OID">info.0.sysinfo.network.interfaces.iface1.ip6</field>
- <field name="CONDITION">ne</field>
- <field name="ACK_CONDITION"></field>
- <statement name="STATEMENT">
- <block type="exec" id="ypPe%Dhn]l$nuieH=A*;">
- <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
- <field name="WITH_STATEMENT">FALSE</field>
- <field name="LOG">error</field>
- <value name="COMMAND">
- <shadow type="text" id="#q,^8HabLpcVafCcHd|k">
- <field name="TEXT">/opt/iobroker/iobroker-data/files/0_userdata.0/sshlogin.exp Passwort IP-Server killall 6tunnel</field>
- </shadow>
- </value>
- <next>
- <block type="timeouts_settimeout" id="FXmZl-ipA;l%Tij54~4Z">
- <field name="NAME">timeout</field>
- <field name="DELAY">5</field>
- <field name="UNIT">sec</field>
- <statement name="STATEMENT">
- <block type="exec" id="O7[opwl_(xmea(ZMlk:@">
- <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
- <field name="WITH_STATEMENT">FALSE</field>
- <field name="LOG">error</field>
- <value name="COMMAND">
- <shadow type="text" id="2UV,kUpTSf]K!2DoMh*[">
- <field name="TEXT"></field>
- </shadow>
- <block type="text_join" id="rIzug;hflFXu3N~Xb^fn">
- <mutation items="3"></mutation>
- <value name="ADD0">
- <block type="text" id="E./Kmp)ZS~rCxAov:A(W">
- <field name="TEXT">/opt/iobroker/iobroker-data/files/0_userdata.0/sshlogin.exp Passwort IP-Server 6tunnel 8081 </field>
- </block>
- </value>
- <value name="ADD1">
- <block type="on_source" id=")IXdU2)q2JuxRqa:4o[G">
- <field name="ATTR">state.val</field>
- </block>
- </value>
- <value name="ADD2">
- <block type="text" id="WcufKyxdwi`t2rS0!Mm`">
- <field name="TEXT"> 8081</field>
- </block>
- </value>
- </block>
- </value>
- </block>
- </statement>
- </block>
- </next>
- </block>
- </statement>
- </block>
- </next>
- </block>
- </xml>
sudo /etc/init.d/networking restart