Friday, August 21, 2020

Remote WSPR and FT-8 with a Raspberry Pi behind a DSL Modem/Router (NVG510) with Google WiFi

This is my third blog post on running WSPR (and FT-8) remotely using a Raspberry Pi connected to a Transceiver.

The first blog post (here) describes a basic setup in which the Raspberry Pi and the device controlling it (e.g. a laptop, a tablet, or a smart-phone) are all on the same network.  For example, the Raspberry Pi and Transceiver could be in one room of a house and WSPR operation could be controlled and monitored using a tablet from another room.

The second blog post (here) expands upon this concept, but rather than controlling and monitoring from a device on the same network as the Raspberry Pi, the Raspberry Pi and Transceiver are controlled via the internet from a location not associated with the local-area-network to which the Raspberry Pi is connected.  In other words, it could be controlled from across town, or across the state, or from a different country.

In the second post the Raspberry Pi (and transceiver) were attached to a local-area-network behind a 5031NV DSL Modem Router.  In this third blog post, I'll discuss a similar setup, but with the Raspberry Pi (and transceiver) behind an NVG510 DSL Modem/Router using Google Wifi in lieu of the Modem/Router's built in WiFi function.

This is the setup:

The network whose setup for remote control I will be discussing is the "Far End" network.  It is controlled from the "Near End" using (in the example shown) a laptop running VNC Viewer. which allows the user at the Near End to interact with the Raspberry Pi's desktop at the Far End.

(Note:  the IP addresses shown in RED are not the real IP addresses.  I've assigned these numbers for purposes of illustration).


Why does the Far End use Google WiFi?

The NVG510 Modem/Router provides internet to our property in Nevada City, California.  There are several structures on this property which require access to this internet, and the NVG510's integrated WiFi does not supply adequate coverage to all of the wireless devices needing it.

On the other hand, the Google WiFi mesh network provides us the coverage we need.

The Google WiFi was purchased several years ago and it consists of three puck-like devices.

One of these pucks connects via an Ethernet cable to one of the Ethernet ports on the back of the NVG510 Modem/Router.

The other two pucks can be located anywhere within range of the first puck -- they do not need to be connected to the NVG510.

The three pucks, operating together, form the WiFi mesh-network.


1.  Setting up the NVG510:

To use VNC Viewer to remotely control and monitor the Raspberry Pi, the VNC application on the Raspberry Pi must have two-way communication through the NVG510's firewall.  To allow this access, I set up the NVG510 using the following steps:

First, it is necessary to log into the NVG510 locally via its control IP address.  Its IP address follows the "For Advanced Device Configuration go to:" line on a sticker on the side of the unit.

At the window which appears, go to the "Firewall" tab and click on the "NAT/Gaming" tab on the line under it:

Clicking on the "NAT/Gaming" tab should bring up a login screen requiring a "Device Access Code".  This code is also found on the side of the NVG510:

Entering the "Device Access Code" will bring up the NAT/Gaming window:

Note that the blue bar under "Hosted Applications" states, "No Application Hosting entries have been defined."

Scroll down the "Service" pull-down menu until you find the entry for "VNC, Virtual Network Computing" and select it.

Then go to the "Needed by Device" pull-down menu and select the Google Wifi device.  In my case, this was the only device on the list.  Note that it can be identified as a Google device by the first three pairs of digits in its MAC address (this MAC address is shown scrunched together at the end of the entry, above).  (If you have these three pairs of digits, you can google which company they are assigned to.  In my case d8:6c:63 is assigned to Google.)

Then click on the "Add" button.  The window should be updated to show the following.  

Note that VNC is now listed as a hosted application.


Next, go to the "IP Passthrough" tab under the "Firewall" tab.

At the "Allocation Mode" pulldown menu, select "Passthrough".

At the "Passthrough Mode" pulldown menu, select "DHCPS-fixed".

And at the "Passthrough fixed MAC Address" select the Google Wifi device (which, in my case, is the only device on the list).

Then click "Save".  

The screen should update to show that the changes have been saved and that you should restart the Modem/Router.

But don't click on "restart" yet.

Before clicking on Restart, let's first go back to the NAT/Gaming tab (still under the Firewall tab) and take a look at how it has changed:

Now click on "Restart".

(By the way -- be sure to do the Passthrough assignment step after the VNC application selection step.  That is, follow the steps in the order I've shown them, above.  If you reverse the order of these two steps you might not be able to assign the VNC application to a device, even if that device is "passthrough".)


Step 2, Setting Up Google WiFi:

Using the Google WiFi app (which is on my tablet and my smart-phone), I did the following:

1.  Go to Settings > Network and General > Advanced networking > Port management.

2.  Click on the "+" (to add).

3.  Find the Raspberry Pi on the list, select it (so that a check-mark appears), then tap "Next".

4.  Select "TCP & UDP" under "External Ports"

5.  Then touch "Internal Ports" and at the text-prompt type "5900" (which is the port number for VNC).

6.  Then tap "Done".

This new "port management rule" should now be saved on the Google Wifi.


Step 3:  Verify that Port 5900 can be seen from the Outside World:

Go to the website "canyouseeme.org" and enter in the Modem/Router's public IP address and "5900" as the port to check.  Then click on "Check Port".

(Note that if you have forgotten the public address to use, you can first look it up on the Modem's control panel, as shown below.)


If everything has been configured correctly, you should see a green "Success" appear on the screen, as shown, below:


Step 4:  Access the Raspberry Pi using the VNC Viewer App:

On your controlling device, open the VNC Viewer app and enter in the Modem/Router's public IP address and "5900", separated with a colon (:) and hit <ENTER>

Continue through the "warning" screen that might appear.  The Raspberry Pi's desktop should then appear in a window on your remote device (laptop, tablet, etc).

That's it!

Done!


A Note on Security:

Important:  allowing VNC Viewer to access the Raspberry Pi from the world outside your router presents a security risk.  The Raspberry Pi's Port 5900 (its VNC port) could now be accessed and your Raspberry Pi, via VNC Viewer, controlled by someone else.  For example, an unknown third party could possibly load software onto your Raspberry Pi that might monitor your network's internal WiFi traffic.

At a minimum, change the Raspberry Pi's password from the default "raspberry".  Or go into the VNC settings and change VNC's password there (under Options>Security -- note that if you select "VNC password" in lieu of "UNIX password", there will be no Username field at the login)
.

Standard Caveat:

I might have made a mistake in my designs, equations, schematics, models, etc. If anything looks confusing or wrong to you, please feel free to comment below or send me an email.

Also, I will note:

This design and any associated information is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



No comments:

Post a Comment