<?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 One-liner to show reserved words within hostnames in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/One-liner-to-show-reserved-words-within-hostnames/m-p/98594#M5213</link>
    <description>&lt;DIV class=""&gt;
&lt;P style="text-align: center;"&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&amp;nbsp;Shows reserved words in hostnames quickly &amp;gt;&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk169892" target="_self"&gt;sk169892&lt;/A&gt;.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":information:"&gt;ℹ️&lt;/span&gt;&amp;nbsp;Can be easily changed to also check these in management databases.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;One-liner (Bash) to assist identifying unsupported reserved words (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk40179" target="_self"&gt;&lt;EM&gt;sk40179&lt;/EM&gt;&lt;/A&gt;) in hostnames.&lt;BR /&gt;&lt;STRONG&gt;In &lt;U&gt;expert&lt;/U&gt; mode run:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo; if [[ -n `hostname|tr '-' '\n'|grep -E '^accept$|^all$|^All$|^and$|^any$|^Any$|^apr$|^Apr$|^april$|^April$|^aug$|^Aug$|^august$|^August$|^black$|^blackboxs$|^blue$|^broadcasts$|^call$|^comment$|^conn$|^date$|^day$|^debug$|^dec$|^Dec$|^december$|^December$|^deffunc$|^define$|^delete$|^delstate$|^direction$|^do$|^domains$|^drop$|^dst$|^dynamic$|^edge$|^else$|^expcall$|^expires$|^export$|^fcall$|^feb$|^Feb$|^february$|^February$|^firebrick$|^foreground$|^forest$|^format$|^fri$|^Fri$|^friday$|^Friday$|^from$|^fw1$|^FW1$|^fwline$|^fwrule$|^gateways$|^get$|^getstate$|^gold$|^gray$|^green$|^hashsize$|^hold$|^host$|^hosts$|^if$|^ifaddr$|^ifid$|^implies$|^in$|^inbound$|^instate$|^interface$|^interfaces$|^ipsecdata$|^ipsecmethods$|^is$|^jan$|^Jan$|^january$|^January$|^jul$|^Jul$|^july$|^July$|^jun$|^Jun$|^june$|^June$|^kbuf$|^keep$|^limit$|^local$|^localhost$|^log$|^LOG$|^logics$|^magenta$|^mar$|^Mar$|^march$|^March$|^may$|^May$|^mday$|^medium$|^modify$|^mon$|^Mon$|^monday$|^Monday$|^month$|^mortrap$|^navy$|^netof$|^nets$|^nexpires$|^not$|^nov$|^Nov$|^november$|^November$|^oct$|^Oct$|^october$|^October$|^or$|^orange$|^origdport$|^origdst$|^origsport$|^origsrc$|^other$|^outbound$|^packet$|^packetid$|^packetlen$|^pass$|^r_arg$|^r_call_counter$|^r_cdir$|^r_cflags$|^r_chandler$|^r_client_community$|^r_client_ifs_grp$|^r_community_left$|^r_connarg$|^r_spii_uuid4$|^r_str_dport$|^r_str_dst$|^r_str_ipp$|^r_str_sport$|^r_str_src$|^r_user$|^record$|^red$|^refresh$|^reject$|^routers$|^r_crule$|^r_ctimeout$|^r_ctype$|^r_curr_feature_id$|^r_data_offset$|^r_dtmatch$|^r_dtmflags$|^r_entry$|^r_g_offset$|^r_ipv6$|^r_mapped_ip$|^r_mflags$|^r_mhandler$|^r_mtimeout$|^r_oldcdir$|^r_pflags$|^r_profile_id$|^r_ro_client_community$|^r_ro_dst_sr$|^r_ro_server_community$|^r_ro_src_sr$|^r_scvres$|^r_server_community$|^r_server_ifs_grp$|^r_service_id$|^r_simple_hdrlen$|^r_spii_ret$|^r_spii_tcpseq$|^r_spii_uuid1$|^r_spii_uuid2$|^r_spii_uuid3$|^sat$|^Sat$|^saturday$|^Saturday$|^second$|^sep$|^Sep$|^september$|^September$|^set$|^setstate$|^skipme$|^skippeer$|^sr$|^src$|^static$|^sun$|^Sun$|^sunday$|^Sunday$|^switchs$|^sync$|^targets$|^thu$|^Thu$|^thursday$|^Thursday$|^to$|^tod$|^tue$|^Tue$|^tuesday$|^Tuesday$|^ufp$|^vanish$|^vars$|^wasskipped$|^wed$|^Wed$|^wednesday$|^Wednesday$|^while$|^xlatedport$|^xlatedst$|^xlatemethod$|^xlatesport$|^xlatesrc$|^xor$|^year$|^zero$|^zero_ip$|^CPM$|^Global$|^Web$|^mon$|^Mon$|^monday$|^Monday$|^tue$|^Tue$|^tuesday$|^Tuesday$|^wed$|^Wed$|^wednesday$|^Wednesday$|^thu$|^Thu$|^thursday$|^Thursday$|^fri$|^Fri$|^friday$|^Friday$|^sat$|^Sat$|^saturday$|^Saturday$|^sun$|^Sun$|^sunday$|^Sunday$|^jan$|^Jan$|^january$|^January$|^feb$|^Feb$|^february$|^February$|^mar$|^Mar$|^march$|^March$|^apr$|^Apr$|^april$|^April$|^may$|^May$|^jun$|^Jun$|^june$|^June$|^jul$|^Jul$|^july$|^July$|^aug$|^Aug$|^august$|^August$|^sep$|^Sep$|^september$|^September$|^oct$|^Oct$|^october$|^October$|^nov$|^Nov$|^november$|^November$|^dec$|^Dec$|^december$|^December$|^date$|^day$|^month$|^year$|^black$|^blue$|^cyan$|^dark$|^firebrick$|^foreground$|^forest$|^gold$|^gray$|^green$|^magenta$|^medium$|^navy$|^orange$|^red$|^sienna$|^yellow$|^Account$|^Alert$|^Auth$|^AuthAlert$|^Duplicate$|^gateways$|^host$|^Long$|^Mail$|^netobj$|^resourceobj$|^routers$|^servers$|^servobj$|^Short$|^SnmpTrap$|^spoof$|^spoofalert$|^targets$|^tracks$|^ufp$|^UserDefined$|^dynobj_list$|^full_service_list$|^ip_list$|^rulenum_list$|^service_list$|^target_list$|^tcpt_list$|^valid_addrs_list$|^ipv6$|^block$|^cp_mgmt$|^art$|^dns_atma$|^wmp_sami$|^rtf$|^sctp$|^rpc$|^diameter$'` ]]; then echo 'Reserved word found!'; else echo 'No reserved words found!'; fi; if [[ -n `hostname|grep -E '^firewall-1$|^fw1$|^FW1$|^fw-1$|^mail$|^smtp$'` ]]; then echo 'Unsecure hostname!'; else echo 'Secure hostname!'; fi; echo&lt;/LI-CODE&gt;
&lt;P&gt;&lt;IMG style="display: block; margin-left: auto; margin-right: auto;" class="image-1 j-img-centered jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/66833_pastedImage_10.png" border="0" width="38" height="37" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This one-liner quickly identifies all reserved words within the hostname of a system. These should never be used anywhere within a Check Point configuration and cause an error message even when used in hostnames starting from R80.40 (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk169892" target="_self"&gt;&lt;EM&gt;sk169892&lt;/EM&gt;&lt;/A&gt;). Also keep in mind that using "-" (dash) signs in the Check Point world is &lt;U&gt;bad practice&lt;/U&gt; as Check Point's INSPECT code will interprete this as a word separator. I've also experienced issues with dash signs in relation to&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk42952" target="_self"&gt;sk42952&lt;/A&gt;. Check Point uses underscores in their solution whenever required (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk117237&amp;amp;partition=General&amp;amp;product=Security#Warnings" target="_self"&gt;&lt;EM&gt;example&lt;/EM&gt;&lt;/A&gt;). But keep in mind that 1400/1500 appliances don't support underscores. Also CIFS/NetBIOS is known to have issues with underscore chracters. Therefore I recommend to use alphabetical characters only within Check Point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 360px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/8330i58350A32ADD8A6E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Integrated with our &lt;STRONG&gt;&lt;A href="https://community.checkpoint.com/docs/DOC-2214-common-check-point-commands-ccc" target="_blank" rel="noopener"&gt;ccc script&lt;/A&gt;&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;-- More one-liners --&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/One-liner-for-Address-Spoofing-Troubleshooting/m-p/33204" target="_self"&gt;One-liner for Address Spoofing Troubleshooting&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.checkpoint.com/t5/Remote-Access-Solutions/One-liner-for-Remote-Access-VPN-Statistics/m-p/79047" target="_self"&gt;One-liner for Remote Address VPN Statistics&lt;/A&gt;&lt;BR /&gt;&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 to show VPN topology on gateways&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/One-liner-to-show-Geo-Policy-on-gateways/m-p/57922" target="_self"&gt;One-liner to show Geo Policy on gateways&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Sat, 01 Jan 2022 15:30:06 GMT</pubDate>
    <dc:creator>Danny</dc:creator>
    <dc:date>2022-01-01T15:30:06Z</dc:date>
    <item>
      <title>One-liner to show reserved words within hostnames</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/One-liner-to-show-reserved-words-within-hostnames/m-p/98594#M5213</link>
      <description>&lt;DIV class=""&gt;
&lt;P style="text-align: center;"&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&amp;nbsp;Shows reserved words in hostnames quickly &amp;gt;&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk169892" target="_self"&gt;sk169892&lt;/A&gt;.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":information:"&gt;ℹ️&lt;/span&gt;&amp;nbsp;Can be easily changed to also check these in management databases.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;One-liner (Bash) to assist identifying unsupported reserved words (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk40179" target="_self"&gt;&lt;EM&gt;sk40179&lt;/EM&gt;&lt;/A&gt;) in hostnames.&lt;BR /&gt;&lt;STRONG&gt;In &lt;U&gt;expert&lt;/U&gt; mode run:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;echo; if [[ -n `hostname|tr '-' '\n'|grep -E '^accept$|^all$|^All$|^and$|^any$|^Any$|^apr$|^Apr$|^april$|^April$|^aug$|^Aug$|^august$|^August$|^black$|^blackboxs$|^blue$|^broadcasts$|^call$|^comment$|^conn$|^date$|^day$|^debug$|^dec$|^Dec$|^december$|^December$|^deffunc$|^define$|^delete$|^delstate$|^direction$|^do$|^domains$|^drop$|^dst$|^dynamic$|^edge$|^else$|^expcall$|^expires$|^export$|^fcall$|^feb$|^Feb$|^february$|^February$|^firebrick$|^foreground$|^forest$|^format$|^fri$|^Fri$|^friday$|^Friday$|^from$|^fw1$|^FW1$|^fwline$|^fwrule$|^gateways$|^get$|^getstate$|^gold$|^gray$|^green$|^hashsize$|^hold$|^host$|^hosts$|^if$|^ifaddr$|^ifid$|^implies$|^in$|^inbound$|^instate$|^interface$|^interfaces$|^ipsecdata$|^ipsecmethods$|^is$|^jan$|^Jan$|^january$|^January$|^jul$|^Jul$|^july$|^July$|^jun$|^Jun$|^june$|^June$|^kbuf$|^keep$|^limit$|^local$|^localhost$|^log$|^LOG$|^logics$|^magenta$|^mar$|^Mar$|^march$|^March$|^may$|^May$|^mday$|^medium$|^modify$|^mon$|^Mon$|^monday$|^Monday$|^month$|^mortrap$|^navy$|^netof$|^nets$|^nexpires$|^not$|^nov$|^Nov$|^november$|^November$|^oct$|^Oct$|^october$|^October$|^or$|^orange$|^origdport$|^origdst$|^origsport$|^origsrc$|^other$|^outbound$|^packet$|^packetid$|^packetlen$|^pass$|^r_arg$|^r_call_counter$|^r_cdir$|^r_cflags$|^r_chandler$|^r_client_community$|^r_client_ifs_grp$|^r_community_left$|^r_connarg$|^r_spii_uuid4$|^r_str_dport$|^r_str_dst$|^r_str_ipp$|^r_str_sport$|^r_str_src$|^r_user$|^record$|^red$|^refresh$|^reject$|^routers$|^r_crule$|^r_ctimeout$|^r_ctype$|^r_curr_feature_id$|^r_data_offset$|^r_dtmatch$|^r_dtmflags$|^r_entry$|^r_g_offset$|^r_ipv6$|^r_mapped_ip$|^r_mflags$|^r_mhandler$|^r_mtimeout$|^r_oldcdir$|^r_pflags$|^r_profile_id$|^r_ro_client_community$|^r_ro_dst_sr$|^r_ro_server_community$|^r_ro_src_sr$|^r_scvres$|^r_server_community$|^r_server_ifs_grp$|^r_service_id$|^r_simple_hdrlen$|^r_spii_ret$|^r_spii_tcpseq$|^r_spii_uuid1$|^r_spii_uuid2$|^r_spii_uuid3$|^sat$|^Sat$|^saturday$|^Saturday$|^second$|^sep$|^Sep$|^september$|^September$|^set$|^setstate$|^skipme$|^skippeer$|^sr$|^src$|^static$|^sun$|^Sun$|^sunday$|^Sunday$|^switchs$|^sync$|^targets$|^thu$|^Thu$|^thursday$|^Thursday$|^to$|^tod$|^tue$|^Tue$|^tuesday$|^Tuesday$|^ufp$|^vanish$|^vars$|^wasskipped$|^wed$|^Wed$|^wednesday$|^Wednesday$|^while$|^xlatedport$|^xlatedst$|^xlatemethod$|^xlatesport$|^xlatesrc$|^xor$|^year$|^zero$|^zero_ip$|^CPM$|^Global$|^Web$|^mon$|^Mon$|^monday$|^Monday$|^tue$|^Tue$|^tuesday$|^Tuesday$|^wed$|^Wed$|^wednesday$|^Wednesday$|^thu$|^Thu$|^thursday$|^Thursday$|^fri$|^Fri$|^friday$|^Friday$|^sat$|^Sat$|^saturday$|^Saturday$|^sun$|^Sun$|^sunday$|^Sunday$|^jan$|^Jan$|^january$|^January$|^feb$|^Feb$|^february$|^February$|^mar$|^Mar$|^march$|^March$|^apr$|^Apr$|^april$|^April$|^may$|^May$|^jun$|^Jun$|^june$|^June$|^jul$|^Jul$|^july$|^July$|^aug$|^Aug$|^august$|^August$|^sep$|^Sep$|^september$|^September$|^oct$|^Oct$|^october$|^October$|^nov$|^Nov$|^november$|^November$|^dec$|^Dec$|^december$|^December$|^date$|^day$|^month$|^year$|^black$|^blue$|^cyan$|^dark$|^firebrick$|^foreground$|^forest$|^gold$|^gray$|^green$|^magenta$|^medium$|^navy$|^orange$|^red$|^sienna$|^yellow$|^Account$|^Alert$|^Auth$|^AuthAlert$|^Duplicate$|^gateways$|^host$|^Long$|^Mail$|^netobj$|^resourceobj$|^routers$|^servers$|^servobj$|^Short$|^SnmpTrap$|^spoof$|^spoofalert$|^targets$|^tracks$|^ufp$|^UserDefined$|^dynobj_list$|^full_service_list$|^ip_list$|^rulenum_list$|^service_list$|^target_list$|^tcpt_list$|^valid_addrs_list$|^ipv6$|^block$|^cp_mgmt$|^art$|^dns_atma$|^wmp_sami$|^rtf$|^sctp$|^rpc$|^diameter$'` ]]; then echo 'Reserved word found!'; else echo 'No reserved words found!'; fi; if [[ -n `hostname|grep -E '^firewall-1$|^fw1$|^FW1$|^fw-1$|^mail$|^smtp$'` ]]; then echo 'Unsecure hostname!'; else echo 'Secure hostname!'; fi; echo&lt;/LI-CODE&gt;
&lt;P&gt;&lt;IMG style="display: block; margin-left: auto; margin-right: auto;" class="image-1 j-img-centered jive-image" src="https://community.checkpoint.com/legacyfs/online/checkpoint/66833_pastedImage_10.png" border="0" width="38" height="37" /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This one-liner quickly identifies all reserved words within the hostname of a system. These should never be used anywhere within a Check Point configuration and cause an error message even when used in hostnames starting from R80.40 (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk169892" target="_self"&gt;&lt;EM&gt;sk169892&lt;/EM&gt;&lt;/A&gt;). Also keep in mind that using "-" (dash) signs in the Check Point world is &lt;U&gt;bad practice&lt;/U&gt; as Check Point's INSPECT code will interprete this as a word separator. I've also experienced issues with dash signs in relation to&amp;nbsp;&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk42952" target="_self"&gt;sk42952&lt;/A&gt;. Check Point uses underscores in their solution whenever required (&lt;A href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk117237&amp;amp;partition=General&amp;amp;product=Security#Warnings" target="_self"&gt;&lt;EM&gt;example&lt;/EM&gt;&lt;/A&gt;). But keep in mind that 1400/1500 appliances don't support underscores. Also CIFS/NetBIOS is known to have issues with underscore chracters. Therefore I recommend to use alphabetical characters only within Check Point.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 360px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/8330i58350A32ADD8A6E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Integrated with our &lt;STRONG&gt;&lt;A href="https://community.checkpoint.com/docs/DOC-2214-common-check-point-commands-ccc" target="_blank" rel="noopener"&gt;ccc script&lt;/A&gt;&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;-- More one-liners --&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/One-liner-for-Address-Spoofing-Troubleshooting/m-p/33204" target="_self"&gt;One-liner for Address Spoofing Troubleshooting&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.checkpoint.com/t5/Remote-Access-Solutions/One-liner-for-Remote-Access-VPN-Statistics/m-p/79047" target="_self"&gt;One-liner for Remote Address VPN Statistics&lt;/A&gt;&lt;BR /&gt;&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 to show VPN topology on gateways&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://community.checkpoint.com/t5/Enterprise-Appliances-and-Gaia/One-liner-to-show-Geo-Policy-on-gateways/m-p/57922" target="_self"&gt;One-liner to show Geo Policy on gateways&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sat, 01 Jan 2022 15:30:06 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/One-liner-to-show-reserved-words-within-hostnames/m-p/98594#M5213</guid>
      <dc:creator>Danny</dc:creator>
      <dc:date>2022-01-01T15:30:06Z</dc:date>
    </item>
  </channel>
</rss>

