Skip to content

Instantly share code, notes, and snippets.

View damiensawyer's full-sized avatar

Damien Sawyer damiensawyer

  • Melbourne, Australia
View GitHub Profile
@damiensawyer
damiensawyer / gist:3438e1cfa308464beabf
Last active March 8, 2017 18:11 — forked from Wysie/gist:7487571
route traffic from home network through VPN selectively.
#!/bin/sh
# Script to route traffic from home network through VPN selectively.
# Based off the discussion at http://www.smallnetbuilder.com/forums/showthread.php?t=9311
# The setup is a Roku box, a Home PC running Plex, and a Synology NAS with a torrent client running a web interface.
# The aim is to have all traffic from Roku go through the VPN, all traffic from the Home PC (and all other devices) bypassing the VPN,
# and the Synology NAS using the VPN. There are however some exceptions. Since Plex uses port 32400, Roku has to bypass the VPN when
# using that port. In addition, port 9091 has to bypass the VPN as well in order to access the Synology torrent client.
#
# Requirements: Asuswrt-Merlin with OpenVPN already set up