[SOLVED]Script to check network

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
narinesa
DD-WRT User


Joined: 06 Jan 2018
Posts: 77

PostPosted: Thu Jul 28, 2022 19:38    Post subject: [SOLVED]Script to check network Reply with quote
Build 49544
Linksys 3200 ACM

Looking for a script (and instructions) to check my vpn network connection.

That is if it is my vpn connection, ok to connect.
If not, do not connect.

Thanks
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12812
Location: Netherlands

PostPosted: Thu Jul 28, 2022 19:59    Post subject: Reply with quote
How can you know if it is OK if you do not connect?

What is it exactly you want?

The OpenVPN client is equipped with a killswitch and a watchdog.

OpenVPN documentation is a sticky in the Advanced Networking Forum which explains it all Smile

I will transfer this thread to said forum as it can be of interest to us all.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
narinesa
DD-WRT User


Joined: 06 Jan 2018
Posts: 77

PostPosted: Thu Jul 28, 2022 20:16    Post subject: Reply with quote
I have 2 networks.
If i cannot connect to nord vpn, then i do not nwant any connection.

I will manually switch to the non vpn local network.

I do not want to do my banking on an unsecured network.
If i do not have the vpn, then i will not do banking.

Where is the watch dog or kill switch and how to use it ?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12812
Location: Netherlands

PostPosted: Thu Jul 28, 2022 20:32    Post subject: Reply with quote
OpenVPN client setup guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=327398


There is also a paragraph for Nordvpn specific settings.

Almost all providers have outdated or even wrong settings for DDWRT

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
narinesa
DD-WRT User


Joined: 06 Jan 2018
Posts: 77

PostPosted: Thu Jul 28, 2022 22:38    Post subject: Reply with quote
ok I found Kill Switch under Nord Open VPN.
Thank you
narinesa
DD-WRT User


Joined: 06 Jan 2018
Posts: 77

PostPosted: Mon Aug 08, 2022 17:40    Post subject: Nord VPN Kill Switch Reply with quote
Nothing seems to work but i try this and it was rejected by my current build

WAN_IF=$(nvram get wan_iface)
iptables -I FORWARD -i br0 -o $WAN_IF -j REJECT --reject-with icmp-host-prohibited
iptables -I FORWARD -i br0 -p tcp -o $WAN_IF -j REJECT --reject-with tcp-reset
iptables -I FORWARD -i br0 -p udp -o $WAN_IF -j REJECT
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12812
Location: Netherlands

PostPosted: Mon Aug 08, 2022 17:53    Post subject: Reply with quote
The Open VPN client has a built-in killswitch as outlined in the OpenVPN client setup guide.

I suggest you read up on it and use that.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
narinesa
DD-WRT User


Joined: 06 Jan 2018
Posts: 77

PostPosted: Mon Aug 08, 2022 18:04    Post subject: Reply with quote
ok will do
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum