Giter Site home page Giter Site logo

cnesa / nordvpn-on-webos-via-linux-box Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielskowronski/nordvpn-on-webos-via-linux-box

0.0 0.0 0.0 257 KB

Purpose of this project is to bypass country lock of content on Netflix or other streaming platforms using NordVPN service on any smart TV that does not have Android (like webOS on LG).

License: GNU General Public License v3.0

PHP 100.00%

nordvpn-on-webos-via-linux-box's Introduction

nordvpn-on-webos-via-linux-box

Purpose of this project is to bypass country lock of content on Netflix or other streaming platforms using NordVPN service on any smart TV that does not have Android (like webOS on LG).

Linux box

Hardware

  • It can by any linux device, especially Raspberry Pi like. In my case it's NanaoPi M1.
  • We need 2 ethernet ports to plug it in between ethernet cable to TV
    • Since most small computers have only one we can use external network adapted connected via USB (should be able to provide 80-90mbps)

Software

NordVPN binary

Router

Interfaces

We'll use following assumptions:

  • eth0 is downstream to real router, static IP is preferable
  • eth1 is port towards TV, using IP 10.0.0.1/24
  • tun0 is spawned by nordvpn binary

To keep old names we need to add rules to /etc/udev/rules.d/70-persistent-net.rules like those (check MAC addr with ip a):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="02:81:61:85:5b:44", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:68:00:52", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Example IP configuration - /etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 192.168.0.100
  netmask 255.255.255.0
  network 192.168.0.0
  broadcast 192.168.0.255
  gateway 192.168.0.1
  dns-nameservers 8.8.8.8

auto eth1
iface eth1 inet static
  address 10.0.0.1
  netmask 255.255.255.0

Packet forwarding

Set net.ipv4.ip_forward = 1 in /etc/sysctl.conf, then sysctl -p /etc/sysctl.conf; service network restart

Firewall

Rules:

iptables --table nat --append POSTROUTING --out-interface tun0 -j MASQUERADE
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

Autorestore them - follow https://major.io/2009/11/16/automatically-loading-iptables-on-debianubuntu/

TV

  • No DHCP, hardcode IP address in settings
    • per assumprions from router section using 10.0.0.2/24, DNS can be anything
  • Leaving WiFi configured but disabled
    • it's easier to just shut it down rather than assume TV's routing will work as intended
    • Linux box will anyway route traffic even when VPN is disconnected
  • I added WebUI as bookmark to TV home screen
    • but remember to use 10.0.0.1, no admin IP

WebUI

  • install apache and php
    • apt install apache2 php libapache2-mod-php
  • drop index.php somewhere in DocumentRoot, easies way it to use one defined in /etc/apache2/sites-enabled/000-default.conf
  • set $TARGET_COUNTRY in source or leave United_States

Rest of hardware

  • additional patchcord
  • reliable USB power supply (USB port on TV will very likely kill power when it's in standby)

Notes

Demo

hardware

WebUI

nordvpn-on-webos-via-linux-box's People

Contributors

danielskowronski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.