• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

[Help] Padavan ASUS RT-N56U VPN Client Script

Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
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
 
Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
Joined
Aug 29, 2005
Messages
7,079 (1.04/day)
Location
Asked my ISP.... 0.0
System Name Lynni PS \ Lenowo TwinkPad T480
Processor AMD Ryzen 7 7700 Raphael \ i7-8550U Kaby Lake-R
Motherboard ASRock B650M PG Riptide Bios v. 2.02 AMD AGESA 1.1.0.0 \ Lenowo 20L60036MX Bios 1.47
Cooling Noctua NH-D15 Chromax.Black (Only middle fan) \ Lenowo WN-2
Memory G.Skill Flare X5 2x16GB DDR5 6000MHZ CL36-36-36-96 AMD EXPO \ Willk Elektronik 2x16GB 2666MHZ CL17
Video Card(s) Asus GeForce RTX™ 4070 Dual OC GPU: 2325-2355 MEM: 1462| Nvidia GeForce MX™ 150 2GB GDDR5 Micron
Storage Gigabyte M30 1TB|Sabrent Rocket 2TB| HDD: 10TB|1TB \ SKHynix 256GB 2242 3x2
Display(s) LG UltraGear 27GP850-B 1440p@165Hz | LG 48CX OLED 4K HDR | AUO 14" 1440p IPS
Case Asus Prime AP201 White Mesh | Lenowo T480 chassis
Audio Device(s) Steelseries Arctis Pro Wireless
Power Supply Be Quiet! Pure Power 12 M 750W Goldie | 65W
Mouse Logitech G305 Lightspeedy Wireless | Lenowo TouchPad & Logitech G305
Keyboard Akko 3108 DS Horizon V2 Cream Yellow | T480 UK Lumi
Software Win11 Pro 23H2 UK
Benchmark Scores 3DMARK: https://www.3dmark.com/3dm/89434432? GPU-Z: https://www.techpowerup.com/gpuz/details/v3zbr
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:

 
Last edited:
Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
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:

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.
 
Joined
Nov 1, 2008
Messages
4,213 (0.75/day)
Location
Vietnam
System Name Gaming System / HTPC-Server
Processor i7 8700K (@4.8 Ghz All-Core) / R7 5900X
Motherboard Z370 Aorus Ultra Gaming / MSI B450 Mortar Max
Cooling CM ML360 / CM ML240L
Memory 16Gb Hynix @3200 MHz / 16Gb Hynix @3000Mhz
Video Card(s) Zotac 3080 / Colorful 1060
Storage 750G MX300 + 2x500G NVMe / 40Tb Reds + 1Tb WD Blue NVMe
Display(s) LG 27GN800-B 27'' 2K 144Hz / Sony TV
Case Xigmatek Aquarius Plus / Corsair Air 240
Audio Device(s) On Board Realtek
Power Supply Super Flower Leadex III Gold 750W / Andyson TX-700 Platinum
Mouse Logitech G502 Hero / K400+
Keyboard Wooting Two / K400+
Software Windows 10 x64
Benchmark Scores Cinebench R15 = 1542 3D Mark Timespy = 9758
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.

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.
 
Joined
Feb 20, 2014
Messages
13 (0.00/day)
System Name CORSAIR
Processor Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz OC @ 4.50GHz
Motherboard MSI Z87-GD65 Gaming
Cooling H100i Extreme Performance CPU Cooler
Memory RipjawsX Series 8 GB PC3-12800/17000 Dual Channel DDR3 Kit (2x4GB)/(2x4GB) 16GB
Video Card(s) N760 TF 2GBD5/OCN760 TF 2GBD5/OC
Storage Samsung SSD 840 Evo 120GB X2 WDC 2TB HDD
Display(s) BenQ XL2430T
Case Vengeance® C70 Mid-Tower Gaming Case — Arctic White
Audio Device(s) Realtek on board
Power Supply Corsair
Software Windows 10
Top