<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Show VPN Routing on CLI in Scripts</title>
    <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/115851#M779</link>
    <description>&lt;P&gt;Cleaned it up for at least r80.30:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;echo -e "\033[0m####################\n# VPN Routing      #\n####################"; fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 | grep -v "+\|\-2" | awk '{split($0,a,";"); print a[6]}' | sort -g | uniq | awk '{split($0,a," "); print a[2]}' | xargs -I % sh -c  'echo -n "External Gateway: "; echo -e "\033[0;31m % \\033[37m"; echo -e "  Routing: \033[32m"; fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 | grep -v "+\|\-2" | awk '\''{split($0,b,";"); print b[4] b[5]}'\'' | sed 's/From\://' | sed 's/To\:/-/' | sort -u; echo -e "\033[0m"'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Sep 2021 13:48:54 GMT</pubDate>
    <dc:creator>David_Brodin</dc:creator>
    <dc:date>2021-09-16T13:48:54Z</dc:date>
    <item>
      <title>Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40216#M523</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sipr123.JPG" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/9445i79D385F866A1A47E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sipr123.JPG" alt="sipr123.JPG" /&gt;&lt;/span&gt;&lt;BR /&gt;The following command shows detailed policy based routing on the CLI. You found the policy based VPN routes&amp;nbsp; to the corresponding external gateway. The basic Check Point table is "&lt;SPAN style="color: #000000;"&gt;fw tab -f -t vpn_routing -u".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_Val__0-1605787183339.png" style="width: 400px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/9111i586FB071EB512585/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_Val__0-1605787183339.png" alt="_Val__0-1605787183339.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Command:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;echo -e "\033[0m####################\n# VPN Routing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #\n####################";fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 |grep -v "+"| awk '{split($0,a,";"); print a[8]}' |sort -ng |uniq | awk '{split($0,a," "); print a[2]}' | xargs -I % sh -c&amp;nbsp; 'echo -n "External Gateway: ";echo -e "\033[0;31m % \\033[37m";echo -e "&amp;nbsp; Routing: \033[32m";fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 |grep % |awk '\''{split($0,b,";"); print b[6] b[7]}'\''| sed 's/From\://'| sed 's/To\:/-/'|sort -u ;echo -e "\033[0m" '&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;A href="https://community.checkpoint.com/migrated-users/55229" target="_blank" rel="noopener"&gt;Heiko Ankenbrand&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 16:26:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40216#M523</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2020-12-01T16:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40217#M524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great job!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:11:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40217#M524</guid>
      <dc:creator>Armin_Weiler</dc:creator>
      <dc:date>2018-07-05T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40218#M525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing!!!&lt;BR /&gt;Thanks for sharing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 20:49:48 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40218#M525</guid>
      <dc:creator>Claudio_Bolcato</dc:creator>
      <dc:date>2018-07-05T20:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40219#M526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2018 07:30:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40219#M526</guid>
      <dc:creator>ED</dc:creator>
      <dc:date>2018-07-06T07:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40220#M527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Awsome. Thank you for sharing.&lt;/P&gt;&lt;P class=""&gt;Do you have a way to reset vpn tunnel via command line?&lt;/P&gt;&lt;P class=""&gt;I would like to automate vpn tu procedure.&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2018 09:08:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40220#M527</guid>
      <dc:creator>Kim_Moberg</dc:creator>
      <dc:date>2018-07-07T09:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40221#M528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you can use the following commands to delete vpn connections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; vpn tu del ipsec all&lt;BR /&gt;&amp;nbsp; vpn tu del ipsec ip-addr&lt;BR /&gt;&amp;nbsp; vpn tu del ipsec ip-addr username&lt;BR /&gt;&amp;nbsp; vpn tu del all&lt;BR /&gt;&amp;nbsp; vpn tu del ip-addr&lt;BR /&gt;&amp;nbsp; vpn tu del ip-addr username&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="" data-containerid="-1" data-containertype="-1" data-objectid="55229" data-objecttype="3" href="https://community.checkpoint.com/people/h.ank2614aef2-c5d1-3f73-bbbd-45c59b9e2728"&gt;Heiko&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2018 12:41:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40221#M528</guid>
      <dc:creator>HeikoAnkenbrand</dc:creator>
      <dc:date>2018-07-07T12:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40222#M529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice command.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2018 07:05:14 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40222#M529</guid>
      <dc:creator>Rolf_Kaschek</dc:creator>
      <dc:date>2018-07-23T07:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40223#M530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to add ProxyID‘s to the routes?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2018 07:11:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40223#M530</guid>
      <dc:creator>Ukko_Metsola</dc:creator>
      <dc:date>2018-07-23T07:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40224#M531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;When I try the show vpn routing on cli on the FW, it does not work.&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;[Expert@fw1-sydney-a]# echo -e "\033[0m####################\n# VPN Routing #\n####################";fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 |grep -v "+"| awk '{split($0,a,";"); print a[8]}' |sort -ng |uniq | awk '{split($0,a," "); print a[2]}' | xargs -I % sh -c 'echo -n "External Gateway: ";echo -e "\033[0;31m % \\033[37m";echo -e " Routing: \033[32m";fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 |grep % |awk '\''{split($0,b,";"); print b[6] b[7]}'\''| sed 's/From\://'| sed 's/To\:/-/'|sort -u ;echo -e "\033[0m" '&lt;BR /&gt;####################&lt;BR /&gt;# VPN Routing #&lt;BR /&gt;####################&lt;BR /&gt;xargs: invalid option -- I&lt;BR /&gt;BusyBox v1.8.1 (2017-11-29 13:01:08 IST) multi-call binary&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Usage: xargs [OPTIONS] [COMMAND] [ARGS...]&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Execute COMMAND on every item given by standard input&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Options:&lt;BR /&gt;-p Prompt the user about whether to run each command&lt;BR /&gt;-r Do not run command for empty read lines&lt;BR /&gt;-x Exit if the size is exceeded&lt;BR /&gt;-0 Input filenames are terminated by a null character&lt;BR /&gt;-t Print the command line on stderr before executing it&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;sort: unknown sort type&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 15:18:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40224#M531</guid>
      <dc:creator>jessica_smith</dc:creator>
      <dc:date>2018-10-18T15:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40225#M532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For me doesn't give any output for some reason. R77.30 Take 338.&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; color: #993366; font-weight: bold;"&gt;fw tab -t vpn_routing -u -f&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;works though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2018 18:51:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40225#M532</guid>
      <dc:creator>Maria_Pologova</dc:creator>
      <dc:date>2018-12-05T18:51:24Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40226#M533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because in actual script additional param seted: "grep -v '+' ". You may use simplified command like this:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fw tab &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;t vpn_routing &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;u &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; awk &lt;SPAN class="string token"&gt;'NR&amp;gt;3 {$0=substr($0,2,28); gsub(", ", ""); gsub("; ", ""); gsub("..", "0x&amp;amp; "); print}'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; xargs printf &lt;SPAN class="string token"&gt;"%d.%d.%d.%d\t-\t%d.%d.%d.%d\tPeer: %d.%d.%d.%d\r\n"&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Checked on many takes of 77.30&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2018 03:12:19 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40226#M533</guid>
      <dc:creator>AlexeyB</dc:creator>
      <dc:date>2018-12-07T03:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40227#M534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brilliant, thank you Alexey. For myself just added sorting by first column.&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fw tab &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;t vpn_routing &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;u &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; awk &lt;SPAN class="string token"&gt;'NR&amp;gt;3 {$0=substr($0,2,28); gsub(", ", ""); gsub("; ", ""); gsub("..", "0x&amp;amp; "); print}'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; xargs printf &lt;SPAN class="string token"&gt;"%d.%d.%d.%d\t-\t%d.%d.%d.%d\tPeer: %d.%d.%d.%d\r\n"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; sort &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;k1n&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Dec 2018 12:30:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40227#M534</guid>
      <dc:creator>Maria_Pologova</dc:creator>
      <dc:date>2018-12-08T12:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40228#M535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any option to edit VPN routes in Kernel ? I have many routes from one peer (not in my control) and I need to remove one route. Please suggest.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Jan 2019 10:31:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40228#M535</guid>
      <dc:creator>Pankaj_Mishra</dc:creator>
      <dc:date>2019-01-04T10:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40229#M536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I adapted the full command to work on a R77.30 Gaia, with the same display as the screenshot:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-php line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;echo&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;e &lt;SPAN class="string token"&gt;"\033[0m####################\n# VPN Routing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #\n####################"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;fw tab &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;f &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;t vpn_routing &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;u &lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;grep &lt;SPAN class="string token"&gt;"+"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; awk &lt;SPAN class="string token"&gt;'{split($4,a,";"); print a[6]}'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;sort &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;ng &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt;uniq &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; awk &lt;SPAN class="string token"&gt;'{split($0,a,":"); print a[2]}'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; xargs &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;I &lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; sh &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;c&amp;nbsp; &lt;SPAN class="string token"&gt;'echo -n "External Gateway: ";echo -e "\033[0;31m % \\033[37m";echo -e "&amp;nbsp; Routing: \033[32m";fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 |grep % |awk '&lt;/SPAN&gt;\&lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="variable token"&gt;$4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;";"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"&amp;nbsp; "&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; b&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'\''&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;|&lt;/SPAN&gt; sed 's&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;From\&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;//'| sed 's/,To\:/---/'|sort -u ;echo -e "\033[0m"'&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2019 17:09:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40229#M536</guid>
      <dc:creator>Benjamin_Lacaze</dc:creator>
      <dc:date>2019-02-05T17:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40230#M537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now you may &lt;SPAN&gt;compare scripts execution times&lt;/SPAN&gt;. My version is faster. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.checkpoint.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&amp;nbsp;Because I don't use `-f` for formating output and I call `fw tab` only once. After all my colleague just added additional sorting for outpue like this:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;sort -t . -k&amp;nbsp; 1,1n -k 2,2n -k 3,3n -k 4,4n&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2019 01:47:00 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/40230#M537</guid>
      <dc:creator>AlexeyB</dc:creator>
      <dc:date>2019-02-06T01:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/51203#M538</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/5815"&gt;@AlexeyB&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I like your solution and created a &lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/One-liner-to-show-VPN-topology-on-gateways/td-p/57975" target="_self"&gt;One-liner&lt;/A&gt; from it that also adds grouping and coloring, which is also included with our &lt;A href="https://community.checkpoint.com/docs/DOC-2214-common-check-point-commands-ccc" target="_blank" rel="noopener"&gt;ccc&lt;/A&gt; script.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 07:29:57 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/51203#M538</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2019-07-11T07:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/52076#M539</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/687"&gt;@Danny&lt;/a&gt;&amp;nbsp; I didn't specifically group the output so that it would be convenient to filter the output line by line, using "grep" to filter by peer or the specific network you need. Everyone can adapt this command to their own needs. I'm glad that my code was useful to someone &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 03:18:23 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/52076#M539</guid>
      <dc:creator>AlexeyB</dc:creator>
      <dc:date>2019-04-29T03:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/70191#M540</link>
      <description>it works,thanks!</description>
      <pubDate>Thu, 12 Dec 2019 02:10:53 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/70191#M540</guid>
      <dc:creator>Solo</dc:creator>
      <dc:date>2019-12-12T02:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/115851#M779</link>
      <description>&lt;P&gt;Cleaned it up for at least r80.30:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;echo -e "\033[0m####################\n# VPN Routing      #\n####################"; fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 | grep -v "+\|\-2" | awk '{split($0,a,";"); print a[6]}' | sort -g | uniq | awk '{split($0,a," "); print a[2]}' | xargs -I % sh -c  'echo -n "External Gateway: "; echo -e "\033[0;31m % \\033[37m"; echo -e "  Routing: \033[32m"; fw tab -f -t vpn_routing -u 2&amp;gt;&amp;amp;1 | grep -v "+\|\-2" | awk '\''{split($0,b,";"); print b[4] b[5]}'\'' | sed 's/From\://' | sed 's/To\:/-/' | sort -u; echo -e "\033[0m"'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Sep 2021 13:48:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/115851#M779</guid>
      <dc:creator>David_Brodin</dc:creator>
      <dc:date>2021-09-16T13:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: Show VPN Routing on CLI</title>
      <link>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/156077#M987</link>
      <description>&lt;P&gt;Great job!!!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 12:17:40 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Scripts/Show-VPN-Routing-on-CLI/m-p/156077#M987</guid>
      <dc:creator>Jesus</dc:creator>
      <dc:date>2022-08-31T12:17:40Z</dc:date>
    </item>
  </channel>
</rss>

