Windscribe VPN on OpenWRT Linksys MR8300
In this article we will be setting up an OpenVPN client on OpenWrt.
In this article we will be setting up an OpenVPN client on OpenWrt.
OpenWrt is an open-source project for embedded operating systems based on Linux, primarily used on embedded devices to route network traffic.
It is fairly easy to install OpenWRT on MR8300 router. All we need to do is to follow the official guide.
Installing Windscribe on OpenWRT is not a simple task though. The only (mostly) working guide has been removed from the net but can still be found in the archives.
Requirements
- A router running OpenWrt (22.03 or 23.05 for MR8300 box)
- Windscribe Pro account
- ssh access to the router
OpenVPN Installation
- Login / ssh to the router.
ssh root@192.168.1.1
orssh root@openwrt.lan
- Update package lists
opkg update
Install luci, if neededopkg install luci
- Install required OpenVPN packages
opkg install luci-app-openvpn
opkg install openvpn-openssl
- If luci is already installed, the same steps can be performed via the UI.
- System -> Software
Firewall Configuration
We will do it by adding the TUN device to an existing WAN zone.
uci set firewall.@zone[1].device="tun0"
uci commit firewall
service firewall restart
@zone[0] is lan and @zone[1] is wan A cooler way of doing the same thing would be:
uci rename firewall.@zone[1]="wan"
uci del_list firewall.wan.device="tun0"
uci add_list firewall.wan.device="tun0"
uci commit firewall
service firewall restart
Download OpenVPN profile
- Go to https://windscribe.com/getconfig/openvpn (must be a pro user)
- Choose a location in the dropdown
- Select
UDP
for the protocol - Select
443
for the port - Select
2.4.6 or newer for OpenVPN
- Download the config and save under some name
For exmaple
Windscribe-Ashdod-YamPark.ovpn
- Get the credentials
username: qsano128-yoluknz
password: 4zrfc6e2ua
Install the profile
-
From router’s luci UI go to
Services > OpenVPN
http://192.168.1.1/cgi-bin/luci/admin/vpn/openvpn -
In the
OVPN configuration file upload
section choose the profile downloaded in the previous step. For example:Windscribe-Ashdod-YamPark.ovpn
-
Enter a name (
windscribe-ashdod
in our case) into theInstance name
text field. -
Click
Upload
-
Under OpenVPN instances, it will now show an entry for
windscribe-ashdod
. Put a checkmark on Enabled. This will enable and start the connection later when we click onSave & Apply
button. -
Now we need to update the profile. Select
Edit
andwindscribe-ashdod
configuration will appear. -
Find the line that reads
auth-user-pass
and change toauth-user-pass /etc/openvpn/windscribe_ashdod.auth
-
Also add following configuration:
script-security 2 up "/etc/openvpn/updns" down "/etc/openvpn/downdns"
-
Add username & password to the second session. For example:
qsano128-yoluknz 4zrfc6e2ua
- please note that the first line is the username and the second line is the password.
-
Click the
Save
button
Add Start-up Scripts
Login / ssh to the router and enter the following commands:
-
Create the first script
cat<<'EOF' > /etc/openvpn/updns #!/bin/sh mv /tmp/resolv.conf.auto /tmp/resolv.conf.auto.hold echo $foreign_option_1 | sed -e 's/dhcp-option DOMAIN/domain/g' -e 's/dhcp-option DNS/nameserver/g' >/tmp/resolv.conf.auto echo $foreign_option_2 | sed -e 's/dhcp-option DOMAIN/domain/g' -e 's/dhcp-option DNS/nameserver/g' >> /tmp/resolv.conf.auto echo $foreign_option_3 | sed -e 's/dhcp-option DOMAIN/domain/g' -e 's/dhcp-option DNS/nameserver/g' >> /tmp/resolv.conf.auto EOF
-
Create the second script
cat<<'EOF' > /etc/openvpn/downdns #!/bin/sh mv /tmp/resolv.conf.auto.hold /tmp/resolv.conf.auto EOF
-
chmod 755 /etc/openvpn/updns
-
chmod 755 /etc/openvpn/downdns
-
This part is a bit tricky as you need to know how to use a command line editor:
vi /etc/config/dhcp
- add this line (properly aligned) at the end of the
config dhcp 'lan'
section:
list dhcp_option '6,10.255.255.1,208.67.222.222,208.67.220.220'
Apply OpenVPN settings
This is a short but an absolutely critical step.
Click on Save Apply
button on OpenVPN UI page.
- note: hopefully you did not forget to Put a checkmark on
Enabled
field in theInstall the profile
step.
We are done, almost!
Test It
We need to deploy our QA skills now.
- Go to ipleak.net
- Please make sure that you are not seeing your ISPs IP address there.
Now we are done. Have questions - please shoot me an email (qas @ blog domain).
You are still here? Why?
OVPN config file (/etc/openvpn/windscribe_ashdod.ovpn)
file (excluding the certificate):
client
dev tun
proto udp
remote tlv-218.whiskergalaxy.com 443
verify-x509-name tlv-218.windscribe.com name
nobind
auth-user-pass /etc/openvpn/windscribe_ashdod.auth
resolv-retry infinite
script-security 2
up "/etc/openvpn/updns"
down "/etc/openvpn/downdns"
cipher AES-256-GCM
ncp-ciphers AES-256-GCM:AES-256-CBC:AES-128-GCM
auth SHA512
verb 2
mute-replay-warnings
remote-cert-tls server
persist-key
persist-tun
key-direction 1
<ca>
Nothing is easy, but who wants nothing?
Subscribe to The infinite monkey theorem
Get the latest posts delivered right to your inbox