Opening a IBM SoftLayer VPN Connection from the Linux command-line
Martin Leyrer November 8 2014 14:27:20
If you need to open a VPN connections to Softlayers private network, you should do this via a browser, as described at http://knowledgelayer.softlayer.com/procedure/ssl-vpn-connections. From what I experienced, with Linux you would need to run a browser as root to follow the instructions.
Fortunately, there is another way: The command-line client. Using that is rather straight forward (except one gotcha).
1. Download the VPN software from http://speedtest.dal05.softlayer.com/array/ArrayNetworksL3VPN_LINUX.zip
cd ~/Downloads
wget http://speedtest.dal05.softlayer.com/array/ArrayNetworksL3VPN_LINUX.zip
2. Rename the zip file to bin (I tried to uncompress it, which failed miserably)
mv ArrayNetworksL3VPN_LINUX.zip ArrayNetworksL3VPN_LINUX.bin
3. Make the file executable
chmod 777 ArrayNetworksL3VPN_LINUX.bin
4. Execute it as root
sudo ./ArrayNetworksL3VPN_LINUX.bin
And your are done.
Now you can open up a VPN connections to Softlayer from the comfort of your command-line:
sudo /usr/local/array_vpn/array_vpnc -hostname https://vpn.ams01.softlayer.com -username [YOUR SOFTLAYER USERNAME] -passwd '[SUPER_SECRET PASSWORD]' &
Which should give you a
array_vpnc: VPN TUNNEL SUCCESSFUL!message back.
A quick "ifconfig tun[x]" should also show a valid 10.a.b.c Softlayer IP adresss.
ifconfig tun1
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.1.16.244 P-t-P:1.1.1.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1450 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:20 (20.0 B) TX bytes:0 (0.0 B)
If you can also successfully ping 10.0.80.11 or your server's private address, you are successfully connected.
ping -c 3 10.0.80.11
PING 10.0.80.11 (10.0.80.11) 56(84) bytes of data.
64 bytes from 10.0.80.11: icmp_seq=1 ttl=253 time=35t4.6 ms
64 bytes from 10.0.80.11: icmp_seq=2 ttl=253 time=34.9 ms
64 bytes from 10.0.80.11: icmp_seq=3 ttl=253 time=35.1 ms
--- 10.0.80.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 34.605/34.886/35.148/0.222 ms
Pro-tip: Use the VPN server of the Softlayer datacenter where your machines reside. Apparently, there exists at least one Softlayer VPN Server for every datacenter:
- https://vpn.dal01.softlayer.com for Dallas, Texas, USA
- https://vpn.sea01.softlayer.com for Seattle, Washington, USA
- https://vpn.wdc01.softlayer.com for Washington, D.C., USA
- https://vpn.ams01.softlayer.com for Amsterdam, The Netherlands, Europe
- and so on ...
I must say, that I was pleasantly surprised (again) by Softlayers support. I had a correct answer to my question in under 5 minutes after opening the ticket.
Comments [0]
No Comments Found