Git Product home page Git Product logo

ac86u-ssh-tunnel's Introduction

ac86u-ssh-tunnel

Used to provide ssh tunnel on ASUS RT-AC86U router. A layer-3 TUN interface will be setup on both VPS and router, which will be used to tunnel the DNS resolve and TCP/UDP traffic for specific domains. The LAN devices behind router (Home PC, smart phone) do not need any additional setup.

Setup VPS

The VPS needs run OpenSSH server V4.3+ with identity key file authentication. It also needs set PermitTunnel to yes in /etc/ssh/sshd_config config file:

PermitTunnel yes

Then restart OpenSSH server, e.g if it's installed as systemd service:

sudo systemctl restart sshd.service

Then run following commands to install tunnel service:

sudo git clone https://github.com/liuliquan/ac86u-ssh-tunnel.git /ac86u-ssh-tunnel
sudo cp /ac86u-ssh-tunnel/vps/ac86u-ssh-tunnel.service /etc/systemd/system/
sudo systemctl enable ac86u-ssh-tunnel.service
sudo systemctl restart ac86u-ssh-tunnel.service

If you don't use systemd service, you may simply run:

sudo /ac86u-ssh-tunnel/vps/start.sh

Setup router

SSH into AC86U router, dowload the repo into /jffs/ac86u-ssh-tunnel folder, then run

cd /jffs/ac86u-ssh-tunnel
chmod +x ./router/setup.sh && ./router/setup.sh

Config router

Update /jffs/ac86u-ssh-tunnel/id_rsa to your own identity key file.

Update /jffs/ac86u-ssh-tunnel/.env to your VPS user/host/port and also your original DNS server (used to resolve the domains which will not go through tunnel).

Use /jffs/ac86u-ssh-tunnel/dns/tunnel-domains.txt to config the site domains to go through ssh tunnel.

Start tunnel

Run /jffs/ac86u-ssh-tunnel/router/start.sh to startup tunnel. It will auto start after router reboot.

ac86u-ssh-tunnel's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

helldiablo

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.