Creating a linux script for Raspberry Pi

Creating a linux script for Raspberry Pi


Job Description

We need a simple script created for Linux (raspberry pi) that will force the pi to only use the WiFi for its Internet connection and use the Wired Ethernet port for the equipment that its connected to.

Project Background - The Pi will be connected to solar monitoring equipment via Ethernet cable. Connecting a computer to port 2 of the solar monitoring equipment will allow you to configure, setup and troubleshoot the solar monitoring system via its internal console portal. The solar panel gets its Internet connection from port 1 and sends the connection out through port 2. While configuring the panels, it maybe required to release\renew the solar monitoring equipment’s Ethernet ports. Doing so will cut the Internet connection to the Pi, which will prevent configuring remotely. As a solution, we think it would be a good idea to add a USB Wi-Fi card to the pi and connect directly to the router via Wi-Fi while still connected to the port 2 of the solar monitoring equipment. The Pi will be receiving its Internet connection directly from the router. The script that we need developed would have to make sure the Pi connected to the router via Wi-Fi and access the solar monitoring portal via the Ethernet connection. We currently are using Hamachi to VPN into the Pi and setup the proxy so we can tunnel in directly to the solar panel equipment from the Internet.

I’ve attached a link to the VPN setup where using for the Pi. We are open to other possible configurations. We have a lab environment where the router, the pi and the solar monitoring system can be accessed remotely from your end via an additional laptop that we have setup on that network using teamviewer.

You will have remote access to the pi as well as the pi image that were currently using. The only thing loaded on the Pi is
- the reverse ssh tunnel (which automatically launches at start-up)
- XRDP (which allows us to work on the pi for testing purposes (which automatically launches at start-up)
- Logmein Hamachi - Used for the reverse ssh tunnel (which automatically launches at start-up)
- The latest updates for the Pi.

We’re running the 'wheezy' version

We will need the settings that the router should have so the router will automatically accept the pi connection as well.

Lastly, we will need to configure the pi so that we can also Remote Desktop Connect from the Internet via XRDP or any recommended RDC solution

Let me know how long it will take. This is phase 2 of a 5-phase project.

Open Attachment

Other open jobs by this client