<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yurisk.info &#187; Esafe</title>
	<atom:link href="http://yurisk.info/category/esafe/feed/" rel="self" type="application/rss+xml" />
	<link>http://yurisk.info</link>
	<description>Technical Blog about IT Security and Networking</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:25:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MAC finder script</title>
		<link>http://yurisk.info/2010/07/02/mac-finder-script/</link>
		<comments>http://yurisk.info/2010/07/02/mac-finder-script/#comments</comments>
		<pubDate>Fri, 02 Jul 2010 05:35:37 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Esafe]]></category>
		<category><![CDATA[Fortigate]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=959</guid>
		<description><![CDATA[While I don&#8217;t like going down to Layer 2 , recently I had to do it &#8211; I didn&#8217;t know IP address of the Cisco router I wanted to connect to but I had access to the Cisco router sitting in the same network. That would be pretty easy to do #show arp on this [...]]]></description>
			<content:encoded><![CDATA[<p>While I don&#8217;t like going down to Layer 2 , recently I had to do it &#8211; I didn&#8217;t know IP address of the Cisco router I wanted to connect to but I had access to the Cisco router sitting in the same network. That would be pretty easy to do #show arp on this router and then search on Google to whom belongs each MAC  if it wasn&#8217;t the subnet mask of /26. Copy pasting each entry of the ARP table into Google didn&#8217;t look like a lot of fun. So I wrote a python script that reads MAC addresses in bulk from command line and using downloaded beforehand database of MAC-vendor translations prints vendor for each MAC address. It works for &#35;show arp on CIsco,&#35;show mac-address-table on CIsco switches, &#35;arp -en  on Linux (means including Checkpoint), &#35;arp -a on Freebsd ,&#35;show arp of Junos from Juniper, &#35;get sys arp on Fortigate.<br />
Below is the script.<br />
Here&#58;<br />
<strong>mac-database.txt</strong> &#8211; file containing MAC-vendor translation in format &lt;MAC 6 hex digits as a sequence&gt; &lt;VENDOR&gt;, I used <a href="http://standards.ieee.org/regauth/oui/oui.txt"> standards.ieee.org/regauth/oui/oui.txt </a> as the source with a bit of sed, but if you want ready to use file I recommend <strong>nmap-mac-prefixes</strong> from nmap source-code distribution <a href="http://nmap.org/svn/nmap-mac-prefixes">http://nmap.org/svn/nmap-mac-prefixes</a><br />
Download script (to make sure formatting is preserved, an important thing for Python)<br />
<a href="http://yurisk.info/scripts/mac-finder.py">http://yurisk.info/scripts/mac-finder.py</a><br />Script AND mac database from nmap project &#8211; <a href="http://yurisk.info/scripts/mac.tar.gz"> http://yurisk.info/scripts/mac.tar.gz</a></p>
<div class="cmdout">
<pre>
&#35;!/usr/bin/python
&#35;This script accepts MAC addresses from the command line and
&#35;prints vendor for each mac address
&#35; Author&#58;Yuri, yurisk@yurisk.info,06.2010
import sys
import re
&#35;This function removes from MACs colon or dot and returns MAC as a sequence of HEX chars
def dotreplace(matchobj):
&nbsp;&nbsp;       if matchobj.group(0) == &#39;.&#39;&#58;
&nbsp;&nbsp;&nbsp;&nbsp;            return &#39;&#39;
&nbsp;&nbsp;       elif  matchobj.group(0) == &#39;&#58;&#39;&#58;
&nbsp;&nbsp;&nbsp;&nbsp;            return &#39;&#39;
&#35;open file with MAC addresses and vendors database,it has form xxxx &lt;Vendor&gt;
macs=open(&#39;mac-database.txt&#39;,&#39;r&#39;)
macs_lines=macs.readlines()
&#35;Read from stdinput
data = sys.stdin.readlines()
for ppp in data:
       popa=re.search(&#39;.*([a-f0-9]{4}\.[a-f0-9]{4}\.[a-f0-9]{4}).*&#39;,ppp,re.IGNORECASE)
       if popa:
             newpopa=re.sub(&#39;\.&#39;, dotreplace,popa.group(1))[0:6]
             newpopa_re=re.compile(newpopa,re.IGNORECASE)
             for mac_db in macs_lines:
                 vendor=re.search(newpopa_re,mac_db)
                 if vendor:
                    print ppp.strip(),mac_db[7:]
       popalinux = re.search(&#39;.*([a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}&#58;[a-f0-9]{2}).*&#39;,ppp,re.IGNORECASE)
       if popalinux&#58;
             newpopalinux=re.sub(&#39;&#58;&#39;,dotreplace,popalinux.group(1))[0&#58;6]
             newpopalinux_re=re.compile(newpopalinux,re.IGNORECASE)
             for mac_db in macs_lines&#58;
                 vendor=re.search(newpopalinux_re,mac_db)
                 if vendor&#58;
                    print ppp.strip(),mac_db[7&#58;]

       popadash = re.search('.*([a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}-[a-f0-9]{2}).*',ppp,re.IGNORECASE)
       if popadash:
             newpopadash=re.sub('-',dotreplace,popadash.group(1))[0:6]
             newpopadash_re=re.compile(newpopadash,re.IGNORECASE)
             for mac_db in macs_lines:
                 vendor=re.search(newpopadash_re,mac_db)
                 if vendor:
                    print ppp.strip(),mac_db[7:]
</pre>
</div>
<p>Running it:</p>
<div class="cmd">
[root@darkstar ]# ./mac-finder.py</div>
<div class="cmdout">
&lt;now I copy paste output from arp -a in BSD&gt;<br />$ arp -a<br />
(10.99.99.150) at 00:50:56:95:74:72 on em0 [ethernet]<br />
 (10.99.99.254) at 00:09:0f:31:c8:24  on em0 [ethernet]<br /> &lt;Hit CTRL+D to signal the end of input&gt;<br />
 (10.99.99.150) at 00:50:56:95:74:72 on em0 [ethernet] VMware, Inc.<br />
 (10.99.99.254) at 00:09:0f:31:c8:24 on em0 [ethernet] Fortinet Inc.</div>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/07/02/mac-finder-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quick and dirty way to bypass eSafe inspection</title>
		<link>http://yurisk.info/2010/05/12/quick-and-dirty-way-to-bypass-esafe-inspection/</link>
		<comments>http://yurisk.info/2010/05/12/quick-and-dirty-way-to-bypass-esafe-inspection/#comments</comments>
		<pubDate>Wed, 12 May 2010 18:46:26 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=747</guid>
		<description><![CDATA[There are times when you need to make some website work immediately while it is being blocked by eSafe for some (many) reasons. And you just don&#8217;t get it working the educated way &#8211; adding to white/exclude lists, changing script/category block options etc.
For the cases just like that Aladdin have provided us with  Exclusion [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when you need to make some website work immediately while it is being blocked by eSafe for some (many) reasons. And you just don&#8217;t get it working the educated way &#8211; adding to white/exclude lists, changing script/category block options etc.<br />
For the cases just like that Aladdin have provided us with <strong> Exclusion List</strong> in <strong> NitroInspection Configuration</strong> . It basically means traffic to/from the IP addresses you put into this list will be COMPLETELY ignored by eSafe scanning engine, and will be moved from interface to interface at the NIC driver speed.<br /> To get there you go to <strong>Options-&gt;-NitroInspection Configuration-&gt;-Exclusion list-&gt;Add</strong><br />
In example below I add facebook.com IP range to such exclusion list.<br />
<a href="http://yurisk.info/nitroinspection.gif"><img src="http://yurisk.info/nitroinspectionsmall.gif" alt="NitroInspection Exclusion list screenshot" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2010/05/12/quick-and-dirty-way-to-bypass-esafe-inspection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increase log size in eSafe</title>
		<link>http://yurisk.info/2009/12/14/310/</link>
		<comments>http://yurisk.info/2009/12/14/310/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 12:26:38 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=310</guid>
		<description><![CDATA[Session logs in eSafe are  essential for debugging  . By default ,nevertheless each Session log file is limited to 100 megabytes in size , after reaching this limit eSafe stops writing the Session logs until the next log rotation &#8211; that is midnight.
To fix this , edit  the file /opt/eSafe/eSafeCR/esafecfg.ini:
[ALERT GENERAL]  
Size limit=2
Last overflow=0
Minimum free [...]]]></description>
			<content:encoded><![CDATA[<p>Session logs in eSafe are  essential for debugging  . By default ,nevertheless each Session log file is limited to 100 megabytes in size , after reaching this limit eSafe stops writing the Session logs until the next log rotation &#8211; that is midnight.</p>
<p>To fix this , edit  the file <strong>/opt/eSafe/eSafeCR/esafecfg.ini</strong>:</p>
<p>[ALERT GENERAL]  <br />
Size limit=2<br />
Last overflow=0<br />
Minimum free disk space=2000<br />
Block if internal error=1<br />
File name=^M<br />
Report days=10<br />
Session log days=7    = &gt;  <strong>Session log days= 365</strong><br />
Report max length=100<br />
Session log max length=100  =&gt;  <strong>Session log max length=500</strong><br />
Log sessions=1<br />
Detailed log sessions=0<br />
Log System Info Interval=10<br />
MMS block if internal error=1<br />
SessionLog To EventLog=0</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/12/14/310/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH login alert by mail Linux or Unix based systems</title>
		<link>http://yurisk.info/2009/09/18/ssh-login-alert-by-mail-linux-or-unix-based-systems/</link>
		<comments>http://yurisk.info/2009/09/18/ssh-login-alert-by-mail-linux-or-unix-based-systems/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 10:24:40 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Checkpoint NG/NGX]]></category>
		<category><![CDATA[Esafe]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=244</guid>
		<description><![CDATA[As you may have noticed many security-related software/appliances are based on Linux or Unix operating
systems in their variety. And as the logical consequence of that remote managing of such devices is done with OpenSSH
package  .  What is lacking in these applications built on Linux/Unix platforms is alerting in real–time on successful
SSH login to the system [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have noticed many security-related software/appliances are based on Linux or Unix operating<br />
systems in their variety. And as the logical consequence of that remote managing of such devices is done with OpenSSH<br />
package  .  What is lacking in these applications built on Linux/Unix platforms is alerting in real–time on successful<br />
SSH login to the system . e.g eSafe can alert only on login to the software itself (i.e. econsole), the same goes for the Checkpoint firewall<br />
. On the other hand SSH login to the system ultimately means superuser/root access that gives control over the whole<br />
system. To fix it I wrote the following script. This script sends mail to predefined email address each time someone<br />
successfully logs in by SSH to the machine.<br />
I take advantage here of the built-in feature of the  OpenSSH daemon – if you create text file containing commands (as if you typed<br />
them on the command line), and name it either <strong>/etc./ssh/sshrc</strong> or <strong>&lt;user home dir&gt;/.ssh/rc</strong> , these commands in file will be run each time user logs in through SSH daemon to the system.<br />
The file has to be readable by the user logging in through SSH.<br />
<strong>Note 1:</strong><br />
file /etc/ssh/sshrc is applied globally to any user logging in, unless:<br />
<strong>Note 2:</strong><br />
 file &lt;user home dir&gt;/.ssh/rc   overrides action of /etc/ssh/sshrc . Caveat here – it is enough for a user to put in his home .ssh directory<br />
 empty file named rc and it will disable /etc/ssh/sshrc including mail alerts sent from it. Actually it is not that big of an issue as you may<br />
create rc file in the home directory of the user yourself, give it 644 permissions and while user will know what is going on when doing ssh login he/she won’t be able to do anything about that.</p>
<p>So to script itself.<br />
<span style="text-decoration:underline;">Here:</span><br />
 <a href="mailto:yurisk@yurisk.info">yurisk@yurisk.info</a>   –   mail to which I get mail alert<br />
 mail.yurisk.info   -   mail server that accepts mails destined for yurisk.info domain (its MX record)<br />
 SENDING_HOST   -  hostname of sending host, will be included in the subject so later I can create mail inbox rule to pay appropriate attention   to such mails<br />
 USER_ID     &#8211; output of the #id command so I will also be able to filter incoming messages on the user logged in</p>
<p>freeBSD# cat /etc/ssh/mail_alert.awk<br />
BEGIN {<br />
 # Set up some info to be included in the mail<br />
 # As you see I prefer to use absolute pathnames , but you don&#8217;t have to<br />
 # Find the hostname to which SSH login happened , to be included in the Subject<br />
 &#8221;/bin/hostname&#8221; | getline SENDING_HOST<br />
 # FInd ID of logged<br />
 &#8221;/usr/bin/id&#8221; | getline<br />
 USER_ID = $1<br />
 SMTP = &#8220;/inet/tcp/0/mail.yurisk.info/25&#8243;<br />
 RS = ORS = &#8220;\r\n&#8221;<br />
 print &#8220;helo yurisk.info&#8221;     |&amp; SMTP<br />
 SMTP                       |&amp; getline<br />
 print &#8220;mail from: &lt;<a href="mailto:yurisk@yurisk.info">yurisk@yurisk.info</a>&gt;&#8221; |&amp; SMTP<br />
 SMTP                       |&amp; getline<br />
 print  &#8220;rcpt to: &lt;<a href="mailto:yurisk@yurisk.info">yurisk@yurisk.info</a>&gt;&#8221;  |&amp; SMTP<br />
 SMTP                       |&amp; getline<br />
 print   &#8220;data&#8221;             |&amp; SMTP<br />
 SMTP                       |&amp; getline<br />
 print  &#8220;Subject:SSH login alert &#8211; user &#8221; USER_ID &#8220;logged in &#8221; SENDING_HOST  |&amp; SMTP<br />
print                       |&amp;  SMTP<br />
 &#8221;/usr/bin/w&#8221; | getline<br />
 print  $0                  |&amp; SMTP<br />
  print   &#8221; He is most free from danger, who, even when safe, is on his guard  &#8220;               |&amp; SMTP</p>
<p>print   &#8220;  &#8220;               |&amp; SMTP<br />
 print  &#8220;.&#8221;                 |&amp; SMTP<br />
 print                      |&amp; SMTP</p>
<p>print  &#8220;quit&#8221;              |&amp; SMTP</p>
<p> }<br />
- Now the file that is checked on each login for commands ( I put both files  in /etc/ssh/) :<br />
freeBSD# cat /etc/ssh/sshrc<br />
awk -f /etc/ssh/mail_alert.awk &gt; /dev/null<br />
<span style="text-decoration:underline;">Note for FreeBSD</span> (I guess any *BSD) users:  in *rc file above you will have to replace awk with gawk, as in *BSD systems awk behaves as the old-style Unix awk that has no bidirectional pipe to connect to mail server.</p>
<p> PS. You might be asking why awk here ? True, Linux/Unix have perfect tool for sending mails called #mail, but I did it with awk<br />
for  a reason &#8211; not on every (especially if hardened) system you will find mail/telnet/etc utilities with which sending mails is more simple and more reliable. The biggest one is Checkpoint firewall &#8211; it has NO mail or telnet clients, neither scripting language beyond AWK and Bash.</p>
<p>The downside of awk is that it is not perfect for more or less complex protocols. So script may stuck / send commands too fast/ etc and therefore be disconnected by the server.</p>
<p>Also if mail server uses greylisting &#8211; this script won&#8217;t understand it. So check it in interactive session before using. If time permits later I will polish it a bit to count for such cases.</p>
<p>BTW If you haven&#8217;t noticed eSafe has full-blown scripting languages installed &#8211; Perl and Python . With these you are limited by your imagination only.</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/09/18/ssh-login-alert-by-mail-linux-or-unix-based-systems/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>eSafe has iptables too &#8230;.</title>
		<link>http://yurisk.info/2009/09/08/esafe-has-iptables-too/</link>
		<comments>http://yurisk.info/2009/09/08/esafe-has-iptables-too/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 17:58:05 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=215</guid>
		<description><![CDATA[Did you know that eSafe  software is based on RedHat Enterprise  Linux (RHEL) ? Of course you did.
But what does it mean? It means that all (or almost all) tools/utilities/programming logic of the Linux is at your fingertips.
Let’s take for example software eSafe runs on the boot
 [root@esafe root]# chkconfig &#8211;list
rdisc                          0:off   1:off   2:off   3:off   [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that eSafe  software is based on RedHat Enterprise  Linux (RHEL) ? Of course you did.<br />
But what does it mean? It means that all (or almost all) tools/utilities/programming logic of the Linux is at your fingertips.<br />
Let’s take for example software eSafe runs on the boot</p>
<p> [root@esafe root]# <strong>chkconfig &#8211;list</strong><br />
rdisc                          0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
anacron                   0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
kudzu                        0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
syslog                       0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
network                   0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
random                    0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
saslauthd                 0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
microcode_ctl      0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
irqbalance              0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
smartd                     0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
atd                             0:off   1:off   2:off   3:on    4:on    5:on    6:off<br />
log2trap                   0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
sshd                          0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
crond                       0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
ntpd                         0:off   1:off   2:off   3:off   4:off   5:off   6:off<br />
<span style="color:#0000ff;">iptables                   0:off   1:off   2:on    3:on    4:on    5:on    6:off<br />
</span>webmin                   0:off   1:off   2:on    3:on    4:off   5:on    6:off<br />
esafe                        0:off   1:off   2:off   3:on    4:on    5:on    6:off</p>
<p>Today I played with just one of them – iptables. First things first – eSafe is not a firewall . You don’t usually give<br />
bunch of papers (called money) to use eSafe for the function that any Pentium 4 PC can do for the fraction of the price. So, it<br />
is not supported and not to be used as the mainstream feature. Nevertheless it is here and may come handy in some situations.</p>
<p>In the output of <span style="text-decoration:underline;">chkconfig &#8211;list</span>  chckconfig showed that whenever eSafe is on, iptables is on as well. The default iptables policy is ALLOW ANY ANY :<br />
[root@esafe root]#<strong> iptables -L</strong><br />
Chain INPUT (policy ACCEPT)<br />
target     prot opt source               destination</p>
<p>Chain FORWARD (policy ACCEPT)<br />
target     prot opt source               destination</p>
<p>Chain OUTPUT (policy ACCEPT)<br />
target     prot opt source               destination</p>
<p>Few observations:<br />
- To block incoming connections destined for the eSafe itself you use INPUT chain, FORWARD chain has no meaning in bridged eSafe Gateway (in routing Gateway mode it  would be applicable I guess)<br />
- I tried few basic rules on the eSafe Hellgate 200 while turning on High-Debug mode , and while machine was loaded by debug<br />
mode , using iptables filtering did not add visible overhead to it.<br />
In most of the deployment scenarios eSafe is installed between internal interface of the firewall and LAN. It means from outside it is protected quite well whereas from LAN it is wide open to any trouble coming in. eSafe has its own means of  limiting access to it from certain IPs.<br />
To limit access to eConsole – you go in eConsole to <strong>Options -&gt; Access and Permissions -&gt; configure user</strong> (by default admin will be there)  and IP from which this user will be granted access.<br />
To limit access to WebGUI (HTTPS) : in the WebGUI go to <strong>Settings -&gt; Access Control -&gt;</strong>  put IP to allow it access in “eSafe Appliance accepts connections from:”<br />
To limit access by SSH use Linux means (there are few ways but I show just one of them) :<br />
 <strong>vi /etc/ssh/sshd_config</strong><br />
# add at the end the following line to limit ssh access to 10.99.99.150 only:<br />
<strong>AllowUsers</strong>   <a href="mailto:*@10.99.99.150">*@10.99.99.150</a><br />
Or, using wildcards to the whole network only:<br />
<strong>AllowUsers</strong>   <a href="mailto:*@10">*@10</a>.*.*.*</p>
<p>All the above is correct and fine BUT – what if you need to temporarily limit access and not permanently ? All the above are permanent changes that will survive  reboot and  if you make a mistake you grant someone a visit to the appliance for  console connection. On the other hand you may use iptables to achieve the same access control and should something go wrong reboot will return all back to normal.</p>
<p>So, let’s go:</p>
<p>- I don’t like when debugging some complicated issue after logging off from eConsole I can’t access it again as someone from LAN already logged in :<br />
1) Grant your IP the access to econsole:<br />
[root@esafe root]# <strong>iptables -I INPUT    -p tcp –s 10.99.99.150 &#8211;dport 43969:43982 -j ACCEPT</strong><br />
2) Deny anyone else<br />
[root@esafe root]# <strong>iptables -I INPUT 2 -p tcp &#8211;dport 43969:43982 -j DROP<br />
</strong>- SSH in general isn’t something  a client should have access to :<br />
1) First allow youself access:<br />
 [root@esafe root]# <strong>iptables -I INPUT -p tcp &#8211;dport 22 -s 10.99.99.150  -j ACCEPT</strong><br />
2) Then deny anyone else:<br />
[root@esafe root]# <strong>iptables -I  INPUT 2 -p tcp &#8211;dport 22   -j DROP</strong></p>
<p>3) Restart ssh daemon (it won&#8217;t disconnect your current session):</p>
<p>[root@esafe root]# <strong>service sshd restart</strong></p>
<p>[root@esafe root]# iptables -L<br />
Chain INPUT (policy ACCEPT)<br />
target     prot opt source               destination<br />
ACCEPT     tcp  &#8211;  10.99.99.150         anywhere           tcp dpt:ssh<br />
DROP       tcp  &#8211;  anywhere             anywhere           tcp dpt:ssh</p>
<p> <br />
Those  addicted to iptables know that some spicy features come with modules and kernel options set at compile time.<br />
To give you the taste of  what is included in eSafe iptables, the listing follows:</p>
<p>/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/arp_tables.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/arpt_mangle.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/arptable_filter.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_conntrack.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_conntrack_amanda.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_conntrack_ftp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_conntrack_irc.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_conntrack_tftp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_nat_amanda.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_nat_ftp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_nat_irc.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_nat_snmp_basic.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_nat_tftp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_queue.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ip_tables.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipchains.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipfwadm.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_DSCP.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_ECN.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_LOG.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_MARK.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_MASQUERADE.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_MIRROR.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_REDIRECT.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_REJECT.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_TCPMSS.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_TOS.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_ULOG.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_ah.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_conntrack.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_dscp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_ecn.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_esp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_helper.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_length.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_limit.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_mac.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_mark.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_multiport.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_owner.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_pkttype.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_recent.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_state.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_tcpmss.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_tos.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_ttl.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/ipt_unclean.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/iptable_filter.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/iptable_mangle.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv4/netfilter/iptable_nat.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/ah6.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/esp6.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/ip6_tunnel.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/ipcomp6.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/ipv6.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6_tables.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_LOG.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_MARK.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_ah.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_dst.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_esp.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_eui64.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_frag.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_hbh.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_hl.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_ipv6header.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_length.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_limit.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_mac.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_mark.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_multiport.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_owner.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6t_rt.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6table_filter.o<br />
/lib/modules/2.4.21-47.ELsmp/kernel/net/ipv6/netfilter/ip6table_mangle.o</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/09/08/esafe-has-iptables-too/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website/malware categorization in eSafe</title>
		<link>http://yurisk.info/2009/06/12/websitemalware-categorization-in-esafe/</link>
		<comments>http://yurisk.info/2009/06/12/websitemalware-categorization-in-esafe/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:41:02 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=162</guid>
		<description><![CDATA[If some website gets blocked by eSafe for being categorized wrongly you
may fix it actually very simple. You enter the link below  and change the website category; this takes some time , usually from few hours up to a day,for  the change to take effect. If website  has no category already then [...]]]></description>
			<content:encoded><![CDATA[<p>If some website gets blocked by eSafe for being categorized wrongly you<br />
may fix it actually very simple. You enter the link below  and change the website category; this takes some time , usually from few hours up to a day,for  the change to take effect. If website  has no category already then update takes effect fast.</p>
<p><a href="http://filterdb.iss.net/urlcheck/">filterdb.iss.net/urlcheck/</a></p>
<p>To see what each category includes:<br />
<a href="http://www-935.ibm.com/services/us/index.wss/detail/iss/a1029077?cntxt=a1027244">www-935.ibm.com/services/us/index.wss/detail/iss/a1029077?cntxt=a1027244 </a></p>
<p>When you want to report an item that was falsely detected as virus/malware by<br />
eSafe you should send your request to :</p>
<p><img src="http://yurisk.files.wordpress.com/2009/06/info1.jpg" alt="info" title="info" width="383" height="49" class="alignnone size-full wp-image-167" /></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/06/12/websitemalware-categorization-in-esafe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eSafe Certified Professional</title>
		<link>http://yurisk.info/2009/03/07/esafe-certified-professional/</link>
		<comments>http://yurisk.info/2009/03/07/esafe-certified-professional/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 15:30:52 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=89</guid>
		<description><![CDATA[Recently I&#8217;ve taken the 2-day course and then successfully passed eSCP certification and here are some impressions about that. First, for serial certification obtainers,for the main question &#8211; what is the gain here? &#8211; I will frankly say &#8211; I don&#8217;t know. This cert isn&#8217;t found under &#8216;most wanted/hot/industry leading&#8217; headings anywhere, so whether it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve taken the 2-day course and then successfully passed eSCP certification and here are some impressions about that. First, for serial certification obtainers,for the main question &#8211; what is the gain here? &#8211; I will frankly say &#8211; I don&#8217;t know. This cert isn&#8217;t found under &#8216;most wanted/hot/industry leading&#8217; headings anywhere, so whether it&#8217;s gonna get you an advantage in  promotion/job search/etc remains an open question.<br />
The course was fully funded by my work and I took part in it for the benfit  of the knowledge I would gain there only. And to take test is possible only after you passed the course. So , let&#8217;s head over to the course.<br />
The course was administered at 3rd-part learning center but by folks from Aladdin  itself ONLY &#8211; one of the strong points of the course. As I understood even if  the course would be given in the heart of Amazonia,Brazil it still would be presented by Aladdin folks, no &#8216;certified instructors&#8217; are employed.<br />
There were 2 instructors , one doing talking and helping in labs , and the other helping in labs . While first instructor  is from Presale team, she could answer any technical questions I had (&#8221;- Can you remind me name of the file to add Ip address to the interface so it survives reboot, unlike ifconfig ?&#8221;).</p>
<p>The overall course consisted of approximately 20% presentations/talks and  80% hands-on labs. The contents can be seen here, only that we dealt with  version 7 only, not 6.2 as in pdf: <a href="ftp://ftp.aladdin.com/pub/marketing/eSafe/Agenda/Expert_Agenda.pdf"><br />
ftp://ftp.aladdin.com/pub/marketing/eSafe/Agenda/Expert_Agenda.pdf</a> .<br />
Every pair of students was given Hellgate appliance to play with. And we used it to the full &#8211; our team even succeeded to push beyond the limit,crash and do RMA on our HellGate &#8211; fastest  RMA ever seen &#8211; took 5 mins to bring new Hellgate.</p>
<p>Everyone was given a book-sized course material including presentations we heard  and labs. The flow was &#8211; presentation then lab. Started with reimaging eSafe from usb, then all config labs as per pdf above. The LDAP lab took much more then was allocated for it as many (including me) are not good fiends with all the AD/LDAP/OU/CN/DN stuff ,eventhough the AD server was preconfigured and we had to  just(?) connect eSafe to it.<br />
Due to time shortage we haven&#8217;t done Web SSL/Reporter/Proxy (not a big deal for me as I am yet to see any of them in the wild) labs.<br />
All setup had access to the Internet , so URL-filtering we could test real-time.</p>
<p>To conclude &#8211; I enjoyed the course, learned lots of new things (my job involves  supporting already installed and working eSafe, so I don&#8217;t do  installing/configuring from scratch the appliance, something our integration department always do) and therefore it was worthwhile.<br />
Upon completion we were given link to password-protected CBT, possibility to open  personal account with portal.aladdin.com , link to download eSafe 7.1 ISO disk  (every eSafe has built-in evaluation license for 30 days), nice bag, and user/pass and link to the website to take exam.</p>
<p>Now to exam &#8211; it is a web based test, with 50 questions and 90 minutes to do it.<br />
The test is pretty easy given you took active part in the course before as it recaptures the same topics. So I did it in about 30 mins, got the web page  &#8220;Congradulations you passed&#8221; and a week later received by a courier framed certificate that I am now eSafe Certified Professional.</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/03/07/esafe-certified-professional/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>eSafe download &#8211; demo, docs</title>
		<link>http://yurisk.info/2009/01/28/esafe-download-demo-docs/</link>
		<comments>http://yurisk.info/2009/01/28/esafe-download-demo-docs/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:48:10 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.info/?p=69</guid>
		<description><![CDATA[Today newcomer to our department asked me how he should start learning eSafe &#8211; should he install Mail or Gateway on VMware ? Erm &#8230; May be docs and manuals (as I did) ? No ,old-fashioned, in our age of
CBTs/virtualization/Camtasia-everywhere buzzwords it needs to be with GUI and interactive, so &#8230;
The best way to start [...]]]></description>
			<content:encoded><![CDATA[<p>Today newcomer to our department asked me how he should start learning eSafe &#8211; should he install Mail or Gateway on VMware ? Erm &#8230; May be docs and manuals (as I did) ? No ,old-fashioned, in our age of<br />
CBTs/virtualization/Camtasia-everywhere buzzwords it needs to be with GUI and interactive, so &#8230;<br />
The best way to start learning a product is first to see it <img src='http://yurisk.info/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; for this Aladdin made a <strong>demo econsole. </strong><br />
After you run it it presents you with dosen of eSafe &#8221;machines&#8221; to any of which you can login by double clicking and feel like you are configuring a real eSafe machine &#8211; all GUI and options are exact copy of real<br />
product. You can get it here after filling form with (ir)relevant details.<br />
<a href="http://www.esafe.com/esafe/demo.aspx">Demo econsole </a></p>
<p>Here is the link for econsole download eSafe 7.1, be aware that is quite important that  you use econsole verison matching <span style="text-decoration:underline;">exactly </span>the<br />
eSafe software version you are trying to connect to. I once had client that installed eSafe 7.0 (some beta release) and downloaded locally econsole from the machine, all worked fine.Then he upgraded eSafe software to 7.1 but did  NOT reinstall  new econsole , as the  result<br />
he couldn&#8217;t find bunch of options in the econsole. In worst scenario using non-matching version of econsole to make configuration changes might cause substantial damage to the eSafe software, up to complete reinstall/reimage.<br />
<a href="http://rapidshare.com/files/278956115/esg_gui.exe" title="eSafe econsole 7.1"> eSafe econsole 7.1 </a><br />
<strong>Docs</strong> Also freely available at :<br />
<a href="http://www.esafe.com/support/esafe_documentation.aspx">eSafe Documenation</a><br />
<strong>Knowledgebase</strong> &#8211; if you work for Aladdin partner you will have access to<br />
complete knowledgebase , while anyone else can see a smaller part of it (that will suffice for few long<br />
weeks of studying nevertheless ).<br />
<a href="https://kb.aladdin.com">kb.aladdin.com </a></p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2009/01/28/esafe-download-demo-docs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Esafe defaults and some debug commands</title>
		<link>http://yurisk.info/2008/09/06/esafe-defaults-and-some-debug-commands/</link>
		<comments>http://yurisk.info/2008/09/06/esafe-defaults-and-some-debug-commands/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 08:50:57 +0000</pubDate>
		<dc:creator>Yuri</dc:creator>
				<category><![CDATA[Esafe]]></category>

		<guid isPermaLink="false">http://yurisk.wordpress.com/?p=9</guid>
		<description><![CDATA[As any other box esafe comes with some default configs , to much of my surprise it takes too long to find them in the Esafe docs, so here they are:
eConsole TCP port: 43970
eConsole UDP port: 43982
Webmin TCP port: 37233    -    https to eSafe, when installed on linux  [last eSAfe to support
Windows was eSafe 6 FR2] [...]]]></description>
			<content:encoded><![CDATA[<p>As any other box esafe comes with some default configs , to much of my surprise it takes too long to find them in the Esafe docs, so here they are:</p>
<p>eConsole TCP port: 43970<br />
eConsole UDP port: 43982<br />
Webmin TCP port: 37233    -    https to eSafe, when installed on linux  [last eSAfe to support<br />
Windows was eSafe 6 FR2]   (<a href="https://ip_address_of_esafe:37233">https://ip_address_of_esafe:37233</a>)</p>
<p> <br />
default  username: root<br />
default  password: kn1TG7psLu<br />
Webmin username: admin<br />
Webmin password: esafe<br />
econsole default username: admin<br />
econsole default pasword: no such, you will be asked to set on first login or during Webmin configuration<br />
 </p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Product Configuration file:<br />
/opt/eSafe/eSafeCR/esafecfg.ini<br />
 <br />
Nitroinspection Configuration file:<br />
/opt/eSafe/esafenipca.ini<br />
 </p>
<p>eSafe Machine Configuration file:<br />
/opt/eSafe/esafe.ini<br />
eSafe Applifilter Configuration file:<br />
/opt/eSafe/eSafeCR/applifilter2.ini</p>
<p> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Spool Directory:<br />
/opt/eSafe/eSafeCR/SPOOL/</p>
<p> Advanced antispam and URL filtering (cobion) database Directory:<br />
/var/esafe/ofdb/</p>
<p> Session log files:<br />
/opt/eSafe/eSafeCR/SessionLog/</p>
<p>Machine logs &#8211; when debug mode enabled logs get written here:<br />
/var/esafe/log/eSafeCR</p>
<p>Debugging procedure , quite standard procedure, provided load on the machine permits<br />
(High Debug mode loads the machine a lot!) you may shorten the time of troubleshooting<br />
when opening ticket in Aladdin.<br />
You need to re-create the problem first in high debug level (you can do it with eConsole: Options &gt; Troubleshooting&#8230; &gt; Clear Log Files &gt; choose High troubleshooting level &gt; re-create the problem &gt; choose &#8220;Off&#8221; to turn off troubleshooting level)</p>
<p>How to create support file:</p>
<p>cd /opt/eSafe<br />
./esafeinf<br />
Collecting eSafe info and log files, Please wait &#8230;</p>
<p>Information successfully logged in<br />
/var/log/1004562_xxxxxxx3430esglog.tar.gz.</p>
<p>or:</p>
<p>enter Webmin (<a href="https://ip_address_of_esafe:37233">https://ip_address_of_esafe:37233</a>) &gt; Support &gt; Create and download eSafe Support Info file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>eSafe Machine configuration script (script has same functionality  as Webmin does):</p>
<p>cd /opt/eSafe<br />
./esgmenu</p>
]]></content:encoded>
			<wfw:commentRss>http://yurisk.info/2008/09/06/esafe-defaults-and-some-debug-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
