fbpx

IOFlood VPN Ubuntu 20.04, 22.04 & Debian 9 Server Auto Connect/ReConnect Setup

In order to connect to IOFloods VPN from Ubuntu 20.04, 22.04 or Debian 9 server or similar linux systems, you will need to do the following as root or sudo user.
Key *:
USERNAME: Use the Username assigned to your VPN Access
PASSWORD: Use the Password assigned to your VPN Access

*** Note ***
If a new server gets added to your account, you must restart the VPN to pickup the new route to the new IPMI IP address before you can connect to it.

1. Install required packages
apt install pptp-linux network-manager-pptp -y

2. Create credential file for VPN Access *
echo "USERNAME PPTP PASSWORD 107.167.83.4" >> /etc/ppp/chap-secrets

3. Setup VPN Route config
cat > /etc/ppp/ip-up.d/route-traffic <<EOF
#!/bin/bash
NET1="10.10.0.0/16"
IFACE="ppp0"
route add -net \${NET1} dev \${IFACE}
EOF

4. Make VPN Route config executable
chmod +x /etc/ppp/ip-up.d/route-traffic

5. Create VPN PPP connection config *
cat > /etc/ppp/peers/ioflood <<EOF
pty "pptp 107.167.83.4 --nolaunchpppd"
name USERNAME
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam ioflood
EOF

6. Allow PPTP through firewall UFW or IPTABLES
UFW:
ufw allow 1723
ufw disable
ufw enable
IPTABLES:
iptables -A INPUT -i pptp -j ACCEPT
iptables -A OUTPUT -o pptp -j ACCEPT
iptables-save > /etc/iptables/rules.v4

Once completed you should be able to start and connect to the VPN by running the first command below.
Starting VPN:

pon ioflood
Stopping VPN:
poff ioflood

**** Optional Auto ReConnect cron script ****
This script will ping one of your IPMIs and if no response restart the VPN connection.

Key *:
IPMIip: Use IP address of IPMI you want to monitor for valid connection EX: 10.10.70.11

1. Make Directory to store script
mkdir /opt/ioflood

2. Create script (Change IPMIip to an IPMI IP you want to monitor) *
cat > /opt/ioflood/iofloodvpnchk.sh <<'EOF'
#!/bin/bash
HOST=IPMIip

DATE=`date`
PINGRES=`ping -c 2 $HOST`
PLOSS=`echo $PINGRES : | grep -oP '\d+(?=% packet loss)'`
echo "$DATE : Loss Result : $PLOSS"

if [ "100" -eq "$PLOSS" ];
then
echo "$DATE : Starting : IOFlood VPN"
pon ioflood
echo "$DATE : Now running : IOFlood VPN"
else
echo "$DATE : Already running : IOFlood VPN"
fi
EOF

3. Make script executable
chmod +x /opt/ioflood/iofloodvpnchk.sh

4. Add the cron to run the script
crontab -e

Now add this to the cron and save
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
*/1 * * * * /opt/ioflood/iofloodvpnchk.sh >> /tmp/iofloodvpn.log 2>&1

Once you have setup the cron you can test it by stopping the VPN waiting 1 minute and checking if the connection was restored.
Stopping VPN
poff ioflood

Checking for VPN connection, Look for ppp0 section
ip a

Response to look for
4: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1396 qdisc pfifo_fast state UNKNOWN group default qlen 3
link/ppp
inet 10.111.5.100 peer 10.167.4.1/32 scope global ppp0
valid_lft forever preferred_lft forever

We don't mean to brag but...

These are some of our statistics:

0
Avg Response Time
0%
Server Uptime
0%
Issues Fixed
0
Trees Planted

What Our Customers
Have To Say

About three years ago we were looking for a new server provider, the problem that we were having was we are not “server guys” and we had over 400 clients to take care of. So anytime we tried to get support we had to submit a ticket, try to explain what was going on, and then pray that the response was in some form that we could understand.

After the on-boarding with Green Olive Tree, they told us that we had twice as much server than we needed and they were not set up right. Thank goodness we have found someone that really looked at what we want to do and gave us real actionable advice. It is safe to say that we have found our server company, and now we can focus on growing out business and not have to worry about the reliability of our support.

Thanks again Green Olive Tree, You Guys Rock!

John Owens

Green Olive Tree has been an invaluable resource to my company allowing me to focus more on my business instead of the management of servers. In the five years I have done business with GOT I have had zero downtime. Knowing that everything is being kept up-to-date and they are proactively patching system flaws gives me peace of mind that I didn’t have before finding Green Olive Tree. Jon has always made himself available when I’ve needed advice or help on upgrading servers or software and I can’t imagine ever going back to managing a server without GOT.

Chris Smith

Green Olive Tree has been very good to us. Jon has helped us scale from 200,000 unique’s visitors a day to over 3 million per day. From 1 server to now 14 on a well-structured load balanced failsafe system. Not only that he has managed to reduce our server resources 3 fold by installing the right kind of software so we’re getting more power out of each server for the same price. He always responds very quickly and stays up at all kinds of crazy hours to help us out, the man never sleeps! I guess that’s why he was a Navy Chief, he brings that discipline into his work and that’s what we love.

Anthony Lipari

Call us today at (800) 269-6465
We can help, contact us today.

Copyright © Green Olive Tree

/* LinkedIn Tag */