Page 241 / 249 Scroll up to view Page 236 - 240
Appendix C – System Log
236
For example, to log all inbound requests from the IP address 5.6.7.8 to the mail server
(port 25) on the machine
flubber
on the LAN with address 192.168.1.1:
iptables -I FORWARD -j LOG -p tcp --syn -s 5.6.7.8/32 -d
192.168.1.1 --dport 25 --log-prefix "Mail for flubber: "
This will result in log output something like this:
<12> Jan 24 18:17:19 2000 klogd: Mail for flubber: IN=eth1
OUT=eth0 SRC=5.6.7.8 DST=192.168.1.1 LEN=48 TOS=0x00 PREC=0x00
TTL=126 ID=45507 DF PROTO=TCP SPT=4088 DPT=25 WINDOW=64240
RES=0x00 SYN URGP=0
Note how the
OUT
value has now changed to show which interface the access attempt
will use to reach the internal host.
As this request arrived on eth1 and was destined for
eth0, we can determine that it was an
inbound
request, since eth0 is the LAN port, and
eth1 is usually the WAN port.
An
outbound
request would have
IN=eth0
and
OUT=eth1
.
It is possible to use the
-i
and
-o
arguments to specify the interface that are to be
considered for
IN
and
OUT
respectively.
When the
!
argument is used before the
interface name, the sense is inverted.
If the name ends in a
+
, then any interface which
begins with this name will match.
e.g.
iptables -I FORWARD -j LOG -i eth0 -p tcp ...
This rule will log outbound from the LAN (eth0) only.
We could limit that further by
specifying which interface it is outbound to, by using the
-o
option.
iptables -I FORWARD -j LOG -i eth0 -o eth1 -p tcp ...
This will log LAN traffic destined for the WAN – but won't log LAN traffic destined for a
PPP or perhaps IPSec link.
Similarly, we could construct a rule that looks at all inbound/outbound traffic, but excludes
VPN traffic, thus:
iptables -I FORWARD -j LOG -i eth+ -o eth+ -p tcp ...
Page 242 / 249
Appendix C – System Log
237
If we just wanted to look at traffic that went out to the IPSec world, we could use:
iptables -I FORWARD -j LOG -o ipsec+
Clearly there are many more combinations possible.
It is therefore possible to write rules that log inbound and outbound traffic, or to construct
several rules that differentiate between the two.
Rate Limiting
iptables
has the facility for rate-limiting the log messages that are generated, in order to
avoid denial of service issues arising out of logging these access attempts. To achieve
this, use the following option:
--limit
rate
rate
is the maximum average matching rate, specified as a number with an
optional
/second
,
/minute
,
/hour
, or
/day
suffix.
The default is
3/hour
.
--limit-burst
number
number
is the maximum initial number of packets to match.
This number gets
recharged by one every time the limit specified above is not reached, up to this
number.
The default is
5
.
iptables
has many more options.
Perform a web search for
manpage iptables
to find the
relevant documentation.
The
LOG
rules configured by default (e.g.
Default Deny:
) are all limited to:
--limit 3/hour --limit-burst 5
Page 243 / 249
Appendix C – System Log
238
Administrative Access Logging
When a user tries to log onto the Web Management Console web administration pages,
one of the following log messages appears:
Jan 30 03:00:18 2000 boa: Authentication successful for root from
10.0.0.2
Jan 30 03:00:14 2000 boa: Authentication attempt failed for root
from 10.0.0.2
This message shows the date/time,
whether the authentication succeeded or failed, the
user attempting authentication (in this case
root
) and the IP address from which the
attempt was made.
Telnet (Command Line Interface) login attempts appear as:
Jan 30 03:18:37 2000 login: Authentication attempt failed for
root from 10.0.0.2
Jan 30 03:18:40 2000 login: Authentication successful for root
from 10.0.0.2
Once again, showing the same information as a web login attempt.
Boot Log Messages
The CyberGuard SG appliance’s startup boot time messages are identified by log
messages similar to the following:
klogd: Linux version 2.4.20-uc0 (jamma@daniel) (gcc version
3.0.4) #4 Mon Feb 3 15:17:50 EST 2003
This also shows the version of the operating system (linux), and the build date and time.
Page 244 / 249
Appendix D – Firmware Upgrade Practices and Precautions
239
Appendix D – Firmware Upgrade
Practices and Precautions
Prior performing any firmware upgrade, it is important that you save a back up of your
existing configuration (
Advanced
->
Store/restore all configuration files
) to a local file.
While we make every effort to ensure your existing configuration will work with the new
firmware, sometimes compatibility problems will arise.
You should be particularly aware
of this possibility when performing a major upgrade.
Note
An upgrade where the minor and/or major revision number is incremented is considered
a major upgrade, e.g. 1.8.5
->
1.9.2, or 1.9.2
->
2.0.0, whereas a patch upgrade
increments the patch revision number only, e.g. 1.9.0
->
1.9.1, or 1.9.0
->
1.9.2.
Warning
If the flash upgrade is interrupted (e.g.
power down), the CyberGuard SG appliance will
stop functioning and will be unusable until its flash is reprogrammed at the factory or a
recovery boot is performed.
User care is advised.
After the upgrade has completed successfully and the CyberGuard SG appliance is back
up and running with the new firmware, run through a few tests.
Ensure that Internet connectivity and any VPN connections can be established and pass
traffic, and that any configured services such as
DHCP Server
,
Access Control
or
Packet Filtering
are functioning as expected.
Page 245 / 249
Appendix D – Firmware Upgrade Practices and Precautions
240
If you encounter any problems, reset the device to its factory default settings and
reconfigure.
You may wish to use your backed up old configuration as a guide in this
process, but
do not
restore it directly.
If you are upgrading a device that you do not normally have physical access to, e.g. at a
remote or client's site, we strongly recommend that following the upgrade, you reset the
device to its factory default configuration and reconfigure as a matter of course.
Note
To restore factory default settings, press the black Reset / Erase button on the rear panel
twice.

Rate

4 / 5 based on 3 votes.

Popular SnapGear Models

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top