Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Kaspars_Zibarts
MVP Gold CHKP MVP Gold CHKP
MVP Gold CHKP

If you are tired typing netstat -nr | grep ^x.x.x.x

Might be very obvious for some but in case your routing table is long and you need to search for routes with grep, you might want to add a "shortcut" as follows

echo '#!/bin/bash'>/usr/bin/showroute; echo 'netstat -nr|grep ^$1'>/usr/bin/showroute; chmod +x /usr/bin/showroute

then use showroute as your command instead of netstat to find routes, i.e

of course you can change showroute alias to something else Smiley Happy

4 Replies
Timothy_Hall
MVP Gold
MVP Gold

Definitely handy, and one can also use ip route get (IP) to find the one matching route that would be used if (IP) was the destination.

--
Second Edition of my "Max Power" Firewall Book
Now Available at http://www.maxpowerfirewalls.com

Gaia 4.18 (R82) Immersion Tips, Tricks, & Best Practices Video Course
Now Available at https://shadowpeak.com/gaia4-18-immersion-course
Kaspars_Zibarts
MVP Gold CHKP MVP Gold CHKP
MVP Gold CHKP

i was just trying to minimise words to type and use tab..  happy weekend!

0 Kudos
Martin_Valenta
Advisor

More reliable than show route destination IP in clish?

0 Kudos
Timothy_Hall
MVP Gold
MVP Gold

Pretty sure they will both give the same result, would be very surprised if they didn't.

--
Second Edition of my "Max Power" Firewall Book
Now Available at http://www.maxpowerfirewalls.com

Gaia 4.18 (R82) Immersion Tips, Tricks, & Best Practices Video Course
Now Available at https://shadowpeak.com/gaia4-18-immersion-course
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events