Xentrk
Part of the Furniture
Here is a sample of the use case examples of the new version.
I will focus the next few days on changes to the installation menu for the new version and a utility to help with the conversion from the current to the new version.
Code:
#### Routing traffic to a VPN Client #####
#======================= ASN Method
# route all traffic matching IPSET list NETFLIX created from AS2906 to VPN Client1
x3mRouting.sh ALL 1 NETFLIX asnum=AS2906
# route all traffic matching IPSET list NETFLIX created from AS2906 to VPN Client1 from LAN device 192.168.22.152
x3mRouting.sh ALL 1 NETFLIX asnum=AS2906 src=192.168.22.152
#======================= Amazon AWS Region Method
# route all traffic matching IPSET list AMAZON_US to VPN Client 1
x3mRouting.sh ALL 1 AMAZON_US aws_region=US
# route all traffic matching IPSET list AMAZON_US from IP address ranges 192.168.22.152-192.168.22.157 created from Amazon US region to VPN Client 1
x3mRouting.sh ALL 1 AMAZON_US aws_region=US src_range=192.168.22.152-192.168.22.157
#======================= dnsmasq Method
# route all traffic matching IPSET list NETFLIX created from domain names to VPN Client1
x3mRouting.sh ALL 1 NETFLIX dnsmasq=netflix.com,nflxext.com,nflximg.net,nflxso.net,nflxvideo.net
# Search dnsmasq.log file for domains that contain the keyword "amazon" and create the IPSET list AMAZON using the dnsmasq metho d
x3mRouting.sh ALL 1 AMAZON autoscan=amazon
# Search dnsmasq.log file for domains that contain the keywords "amazonaws,netflix,nflx" and create the IPSET list AMZ_NFLX using the dnsmasq method
x3mRouting.sh ALL 1 AMZ_NFLX autoscan=amazonaws,netflix,nflx
#======================= Manual Method
# route all traffic matching IPSET list WIMIPCOM to VPN Client 1 (x3mRouting.shly created list)
x3mRouting.sh ALL 1 WIMIPCOM
# route all VPN Client 1 traffic matching IPSET list WIMIPCOM created from the IPv4 addresses provided
x3mRouting.sh ALL 1 WIMIPCOM ip=104.27.198.90,104.27.199.90
#### VPN Client Bypass Routing #####
#======================= ASN Method
# VPN Client Bypass: route VPN Client 1 traffic matching IPSET list NETFLIX to WAN
x3mRouting.sh 1 0 NETFLIX asnum=AS2906
# VPN Client Bypass: route VPN Client 1 traffic from 192.168.22.152 matching IPSET list NETFLIX to WAN
x3mRouting.sh 1 0 NETFLIX asnum=AS2906 src=192.168.22.152
#======================= Amazon AWS Region Method
# VPN Client Bypass: route VPN Client 1 traffic matching IPSET list AMAZON_US to WAN
x3mRouting.sh 1 0 AMAZON_US aws_region=US
# VPN Client Bypass: route VPN Client 1 traffic from 192.168.22.152-192.168.22.157 matching IPSET list AMAZON_US to WAN
x3mRouting.sh 1 0 AMAZON_US aws_region=US src_range=192.168.22.152-192.168.22.157
#======================= dnsmasq Method
# VPN Client Bypass: route all VPN Client 1 traffic matching IPSET list WIMIPCOM to the WAN (x3mRouting.shly created list)
x3mRouting.sh 1 0 WIMIPCOM dnsmasq=whatismyip.com
# VPN Client Bypass: route all VPN Client 1 traffic matching IPSET list NETFLIX to the WAN
x3mRouting.sh 1 0 NETFLIX dnsmasq=netflix.com,nflxext.com,nflximg.net,nflxso.net,nflxvideo.net
# VPN Client Bypass: route VPN Client 1 traffic from 192.168.22.152 matching IPSET list NETFLIX to WAN
x3mRouting.sh 1 0 NETFLIX domain=netflix.com,nflxext.com,nflximg.net,nflxso.net,nflxvideo.net src=192.168.22.152
#======================= Manual Method
# VPN Client Bypass: route all VPN Client 1 traffic matching IPSET list WIMIPCOM to the WAN
x3mRouting.sh 1 0 WIMIPCOM
# VPN Client Bypass: route all VPN Client 1 traffic matching IPSET list WIMIPCOM created from the IPv4 addresses provided to the WAN
x3mRouting.sh 1 0 WIMIPCOM ip=104.27.198.90,104.27.199.90
# VPN Client Bypass: route VPN Client 1 traffic from 192.168.22.152 matching IPSET list WIMIPCOM to the WAN
x3mRouting.sh 1 0 WIMIPCOM src=192.168.22.152
# VPN Client Bypass: route VPN Client 1 traffic from 192.168.22.152-192.168.22.157 matching IPSET list WIMIPCOM to WAN
x3mRouting.sh 1 0 WIMIPCOM src_range=192.168.22.152-192.168.22.157
#________________________________________________________________________________________________
#
#### Delete an IPSET list and all routing rules and cru jobs ####
# Either option will work. There is no requirement to specify the method
x3mRouting.sh ipset_name=MYIPSET del
x3mRouting.sh ALL 1 NETFLIX del
#________________________________________________________________________________________________
#
#====================== IPSET list creation only - no routing rules
#====================== ASN Method
# Create IPSET list NETFLIX from AS2906
x3mRouting.sh ipset_name=NETFLIX asnum=AS2906 # create IPSET list using AS2906 as the source
#====================== Amazon AWS Region Method
# Create IPSET list AMAZON_US created from Amazon US region
x3mRouting.sh ipset_name=AMAZON_US aws_region=US
#======================= dnsmasq Method
# Create IPSET list NETFLIX using dnsmasq method
x3mRouting.sh ipset_name=NETFLIX dnsmasq=netflix.com,nflxext.com,nflximg.net,nflxso.net,nflxvideo.net
#====================== Manual Method
#Create IPSET list BBC using manual method
x3mRouting.sh ipset_name=BBC
# Create IPSET list BBC using manual method. Use 'dir' location as the backup/restore location
x3mRouting.sh ipset_name=BBC dir=/tmp/mnt/RT-AC88U/mylists
#________________________________________________________________________________________________
#
####### VPN Server to VPN Client Routing:
# route from server 1,2 or both to VPN client 1,2,3,4,5
x3mRouting.sh server=1 client=1
x3mRouting.sh server=2 client=1
x3mRouting.sh server=both client=1
#________________________________________________________________________________________________
####### VPN Server to existing LAN routing rules for an IPSET list
# route from server 1,2 or both to use same LAN rules for IPSET list PANDORA
x3mRouting.sh server=1 ipset_name=PANDORA
x3mRouting.sh server=2 ipset_name=PANDORA
x3mRouting.sh server=both ipset_name=PANDORA
Last edited: