What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Confirm VPN gateway lookup code

janosek

Regular Contributor
Hello,

I am still new to router scripting and I read many different pages, guides and threads. I was wondering if anyone could confirm if the code I have (modified from cornasdf who has DD-WRT) will indeed look up the ISP, tun11 and tun12 gateways? If you could confirm the code in your run cmd, that would be helpful.

IspGateway=$(ip route list table main | awk '/default/ { print $3}')
tun11Gateway=$(ip route list table main | awk '/tun11/ { print $3}' | sort -u | grep -v 'tun11')
tun12Gateway=$(ip route list table main | awk '/tun12/ { print $3}' | sort -u | grep -v 'tun12')

Thanks!
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top