# [Help] Padavan ASUS RT-N56U VPN Client Script



## thejames10 (Jan 17, 2017)

One of my main gripes about using one router in the household to handle everything is that when I want to use the VPN Client all connected devices are then routed through the VPN tunnel Interface. 

Now with some help from the torguard website there was a script posted to manage it in such a way where only an IP range of devices would route through the tunnel which is almost great.

I want to be completely confident at all times for those specific devices using the VPN that they will never leak my ISP IP. I have come up with a solution even though my understanding of iptables is definitely inadequate to come up with a proper solution. 

In the ipup() function I have added an ACCEPT command along with a DROP command in the ipdown() function. Is this all I have to do? I know there is an -I Insert argument and a -A Append argument. I don't want to keep adding to the iptables as I would rather want to remove the command or even just edit the command. Otherwise wouldn't I just have a bunch of ACCEPT/DROP commands as time goes on?

TL;DR Have I handled the DROP/ACCEPT commands at the end of both functions properly?

Pastebin: http://pastebin.com/QN2uutvw


----------



## thejames10 (Jan 20, 2017)

Bump


----------



## thejames10 (Jan 25, 2017)

Bump!


----------



## thejames10 (Feb 3, 2017)

Bump


----------



## puma99dk| (Feb 3, 2017)

I tried the stock openvpn script from TorGuard works well on Asus RT-AC66U but I wouldn't recommend it, bcs last time I tested I got around 5mbit or so and I really doubt ur RT-N56U would do even better.

I would recommend u to either use their client or build ur own router if u want ur full speed.


I have a 100/25mbit Cable connection and with the TorGuard client I get these speeds 99% of the time:


----------



## thejames10 (Feb 5, 2017)

puma99dk| said:


> I tried the stock openvpn script from TorGuard works well on Asus RT-AC66U but I wouldn't recommend it, bcs last time I tested I got around 5mbit or so and I really doubt ur RT-N56U would do even better.
> 
> I would recommend u to either use their client or build ur own router if u want ur full speed.
> 
> ...


My current VPN Provider is with Private Internet Access. I have been able to get 10 mbit + but speed is not really my issue. I have been fooling around with both scripts (including the one you mentioned) which I have successfully allocated a specific range of 192.168.1.0/24 IPs. My issue is that after a few days have gone by I notice that all devices are routing through the VPN which is really annoying. A simple restart fixes this but I don't want to be restarting my device constantly. I have read that it may be due to the firewall restarting etc. I have tried placing the script in all possible places but to no avail after some days all devices are being routed through the VPN when only a range of devices are supposed to be using the VPN. I think it's something to do with the tables getting wiped but not sure what is causing that to happen.

*Custom User Scripts*
Run Before Router Initialized:
Run After Router Started:
Run After WAN Up/Down Events:
Run After Firewall Rules Restarted:
Run On Press WPS/FN Ez-Buttons:
Run the Script After Connected/Disconnected to VPN Server:

These are all my options as to where to place the script using a triggered event.


----------



## silkstone (Feb 5, 2017)

thejames10 said:


> My current VPN Provider is with Private Internet Access. I have been able to get 10 mbit + but speed is not really my issue. I have been fooling around with both scripts (including the one you mentioned) which I have successfully allocated a specific range of 192.168.1.0/24 IPs. My issue is that after a few days have gone by I notice that all devices are routing through the VPN which is really annoying. A simple restart fixes this but I don't want to be restarting my device constantly. I have read that it may be due to the firewall restarting etc. I have tried placing the script in all possible places but to no avail after some days all devices are being routed through the VPN when only a range of devices are supposed to be using the VPN. I think it's something to do with the tables getting wiped but not sure what is causing that to happen.
> 
> *Custom User Scripts*
> Run Before Router Initialized:
> ...



Following as I'd like to do this on my network.

To kind of solve your problem, couldn't you just set your router to reboot each day? Not ideal, but it should solve the issue.


----------



## thejames10 (Feb 20, 2017)

Bump


----------

