Date
1 - 13 of 13
KiwiSDR dynamic IP address
Gur Lavie
Hi,
Because of some network configuration problem, my KIWISDR is changing its IP address every few hours. Is there a method to periodically update the address in the wsprdaemon.conf file ? Thanks Gur |
|
Rob Robinett
If your DNS service tracks the changing IP address of your Kiwis, then you could specify the DNS names of the Kiwis. When their IP address changes the WD sessions would error and WD would retry a session at the new IP address supplied by your DNS server. If your DNS server doesn't track that, then you could write a little script to maintain the correct IP addresses in your Pi's /etc/hosts file. On Thu, Nov 11, 2021 at 9:41 AM Gur Lavie <gurlavie@...> wrote: Hi, --
|
|
Rob Robinett
Another solution would be to have your Kiwis maintain ssh sessions with your Pi (or another server with a static IP address) and forward ports on that Pi/server back to the Kiwis port 8073 through the tunnels created by that ssh session. For example: on the Kiwi cmd line run 'ssh -R 8073:localhost:8073 someuser@...'. Then your WD would be configured to access that Kiwi at 'someserver.net:8073' I have attached a script which maintains such a session at one WD site. After running it once you will need to modify the wd-tunnels.conf for your environment and configure a user account on 'some_server' and set up that account to allow your Kiwi to autologin. Of course there will be interruptions when your Kiwis change IP addresses while the current listener ssh sessions to your PI/server timeout and are re-established.
--
|
|
Gur Lavie
On Thu, Nov 11, 2021 at 10:24 AM, Rob Robinett wrote:
ssh -R 8073:localhost:8073 someuser@...Hi, The tunnel method looks super advanced and really fun. I tried to deploy it, but I guess I am falling on the trivial things I am missing. Should I generate public/private key so I can login without password ? On the Kiwi, the command sh -R 8073:localhost:8073 kiwisdr@... succeeded prompting the password and then entering a remote shell on the "Server" But on the SERVER (which also runs WD), the password prompt is asynchronous
Gur
|
|
Gur Lavie
Hi again,
I managed to work around the passwords (with the keys and ssh-copy-id remote_username@server_ip_address). So on the SERVER (and WD computer), I am running fine: "connect_to_wd_daemon is running with pid 26374" On the KIWI console after executing ssh -R 8073:localhost:8073 kiwisdr@... I am seeing the SERVER prompt. And in the wsprdaemon.conf, I have the KIWI defined as : "KIWI_0 192.168.68.125:8073 " Which means it IS NOT listing the KIWI address but the "remote" side of the tunnel. But no WD connections on the kiwi... Any suggestions ? |
|
Rob Robinett
Congratulations! It took me 2 years to get that far with ssh ;=) While the Kiiw's ssh session with your server is active, you should be about to access the Kiwi at: http://SERVER_IP:8073. The config of WD running on SERVER should list your Kiwi receiver at 'localhost:8073' On Sun, Nov 14, 2021 at 9:06 AM Gur Lavie <gurlavie@...> wrote: Hi again, --
|
|
Gur Lavie
hehehe I had to keep myself concentrated for 2 hours to get this done :) not an easy task....
I was indeed testing accessing the kiwi through the SERVER:8073.....but it didn't work... I am thinking that the "tunnel" I opened from the kiwi local console which is "interactive" might be "local" to the context of the kiwi console session ? and the port forwarding might not be globally available ? hence not seen by others ? |
|
Rob Robinett
Unless there are iptables rules which suppress such traffic, SERVER:8073 will be global and any packets sent to it from any IP address will be forwarded through the tunnel to the Kiwi where they will be delivered to the Kiwi's localhost:8073 port. run: "sudo iptables -L "to see if there are any such rules. On Sun, Nov 14, 2021 at 9:43 AM Gur Lavie <gurlavie@...> wrote: hehehe I had to keep myself concentrated for 2 hours to get this done :) not an easy task.... --
|
|
Gur Lavie
Yohoooo,
I was missing in /etc/ssh/sshd_config an explicit directive : GatewayPorts yes :) It now works like magic ! Amazing ! Rob - you are amazing ! The script is so nice and elegant. Really a jam. And I can't close without a question ... I guess I now need to automate or spawn the tunnel creation from the kiwi side into an automatic independent way - not through the Console. Because with timeout I am loosing the Console and then the tunnel I am very cautious with touching the Kiwi files, not to lose access... Any recommended/preferred way ? Thanks for all the help ! Gur |
|
Rob Robinett
First, on the Kiwi run:
To see the status of of your tunnel: ./wd-tunnel.sh -s To watch the log file output of the running tunnel run: ./wd-tunnel.sh -l |
|
Rob Robinett
Good debugging! The tunnel is a Kiwi daemon which will restart if the ssh session from the Kiwi to your server fails. In order for that daemon to start during a Kiwi power cycle or reboot, there needs to be a systemctl configuration file registered with Llinux on the Kiwi. I'll put adding that feature on my 'TODO' list for the next time I'm working with Kiwis On Sun, Nov 14, 2021 at 10:14 AM Gur Lavie <gurlavie@...> wrote: Yohoooo, --
|
|
Gur Lavie
Thanks.
But maybe I missed something. I still need a way to run the RSS command..... ssh -R 8073:localhost:8073 kiwisdr@... I need to automate it ? Gur |
|
Gur Lavie
ok sorry. I guess its in the script :)
|
|