Checkpoint Troubleshooting
Checkpoint Troubleshooting
Check Point
Firewalls
A structured approach
Christian Halbe / September 12, 2012
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Data collection
General health parameters
OS parameters to check
fw status and tables
Cluster state
Analysis flow
A journey to the center of the firewall
Fw monitor
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Collect information
is it really the firewall
to blame?
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Data collection
... Is it really the firewall?
Get the facts together
Source
Destination
Port
Traceroute from both ends
Any NAT involved?
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
92 total,
2 running,
1 user,
90 sleeping,
0 stopped,
0 zombie
Cpu0
1.7%us,
2.0%sy,
0.0%ni, 80.0%id,
0.0%wa,
3.7%hi, 12.7%si,
Cpu1
0.0%us,
0.3%sy,
0.0%ni, 81.0%id,
0.0%wa,
4.3%hi, 14.3%si,
Cpu2
0.0%us,
0.0%sy,
0.0%ni, 83.9%id,
0.0%wa,
1.7%hi, 14.4%si,
Cpu3
0.0%us,
0.7%sy,
0.0%ni, 23.3%id,
0.0%wa,
0.0%hi, 76.0%si,
Mem:
2073884k total,
1709532k used,
364352k free,
Swap:
4192956k total,
563280k used,
3629676k free,
1 for
0.0%st
average
0.0%st
0.0%st
225088k buffers
62776k cached
PID USER
PR
NI
VIRT
RES
TIME+
COMMAND
2111 root
15
0 S
77
0.0
3477 root
15
432m
76m
13m R
3.8
2248 root
15
0 S
0.0
3844 root
15
1 root
15
1600
472
448 S
0.0
0:11.64 init
2 root
RT
-5
0 S
0.0
0:10.34 migration/0
22898:41 fw_worker_0
8632:24 fw
40:00.79 fw_worker_2
[...]
6
0.0%st
Press
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
P, M to
sort
|Mask
|MTU
|State|Mac Address
|Description
---------------------------------------------------------------------------------|lo
127.0.0.1|
|s0p1|
255.0.0.0|16436|
1|
|Not supported|
172.16.1.2|255.255.255.252| 1500|
1|44-1e-a1-47-1e-98|Not supported|
|s0p0|207.169.218.181|255.255.255.248| 1500|
1|44-1e-a1-47-1e-9a|Not supported|
1|a0-36-9f-00-48-04|Not supported|
----------------------------------------------------------------------------------
Interface counters
netstat -i
Kernel Interface table
Iface
lo
MTU Met
16436
4001875
4001875
0 LRU
s0p0
1500
7562334
7744992
0 BMRU
s0p1
1500
0 87522045
0 87252894
0 BMRU
s2p1
1500
0 BMRU
7222468
7127176
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
NAME
localhost
connections
258651
NAT table
[Expert@datgwy04a]# fw tab -s -t fwx_alloc
HOST
NAME
localhost
fwx_alloc
IF
POLICY
DATE
TOTAL REJECT
DROP ACCEPT
LOG
18 245726
30 429959
30
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Number
Unique Address
Assigned Load
State
172.16.1.1
100%
Active
2 (local)
172.16.1.2
0%
Standby
Messages
Always browse through the latest entries in /var/log/messages
10
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Analysis flow
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Is it in the
firewall
log?
Also check
the log with
src/dst
swapped
(asymmetric
routing? Only
return traffic
on the
firewall?)
If you get a
log, follow the
accept or
drop flow.
Is it seen
on the
inbound IF?
Check with
tcpdump
while the
connection is
being tested.
When you
find packets,
continue with
the deep flow
and fw
monitor
Upstream
gateway
reachable?
Check routing
for the source
and ping the
gateway.
If theres no
echo reply, is
there at least
an ARP reply?
Check
arp -a
Proxy ARP
needed?
Is a NAT IP in
the connected
inbound
network
used?
Check proxy
arp fw ctl
arp
Cluster: Is
the cluster
IP up?
Check that
the firewall is
listening on
the cluster IP
by cphaprob
a if
When you reached the end of this chain: Most likely routing is not okay or there
might be another firewall on the upstream?
12
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Spoofing?
Is the packet
arriving on
the correct
interface?
Check return
routing and
related antispoofing
records.
Drop for
return
packet
only?
Points to
asymmetric
routing
condition.
The initial
packet took
another path.
Accept
followed by
spoofing
drop?
Check the
interface on
the drop. Is it
coming from
the outbound
interface?
Then the
downstream
router is
bouncing the
packet back.
Accept
followed by
other drop?
Typically
caused by
protocol
anomalies.
Example: FTP
session not
adhering to
Check Points
RFC
interpretation
Check the
rulebase for
ordering
issues. Try
recreating the
rule in
another
position.
Migh require
full tcpdump
capture for
further
analysis
just
a rule change
Ordinary
drop?
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
is
Check for
NAT
Check the log
entry. Is NAT
required? Is it
properly
applied?
Check
destination
routing
Downstrea
m gateway
reachable?
Is the packet
forwarded to
the right
interface and
gateway?
Check routing
for the
destination
and ping the
gateway.
On historic
policies: Is
the NAT
destination
route in
place?
If theres no
echo reply, is
there at least
an ARP reply?
Check
arp a
Proxy ARP
needed?
Is a source
NAT IP in the
connected
oztbound
network
used?
Check proxy
arp fw ctl
arp
Cluster: Is
the cluster
IP up?
Check that
the firewall is
listening on
the cluster IP
on the
outbound
interface by
cphaprob a
if
When you reached the end of this chain: Most likely routing is not okay to the
destination or back. There might also be another firewall on the downstream...
Is the target up and listening?
14
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Run fw
monitor
Try to apply a
reasonable
inspect filter
to limit the
volume of
data
Is the
packet
making it
through?
When you
see the
packet
disappearing
within the
firewall
chains, check
for silent
drops with fw
ctl zdebug
drop
Is there
return
traffic?
Check for
return traffic.
Is it going
back to the
correct
interface? Is
any NAT
properly
undone?
Is the
source
reachable?
Time for a
full packet
capture
There may be
a problem
with the
upstream
return route.
If it looks all
correct up to
here, capture
a full session,
reproducing
the problem
for offline
analysis.
When you reached the end of this chain the issue most likely is beyond what
can be easily fixed.
15
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OS IP Stack L3
Check Point
in chain
Check Point
out chain
Optional: Secure XL
17
OS NIC driver
OS NIC driver
eth0
eth1
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
in chain
Virtual Reassembly
Accounting
IP side accounting
NAT / VM
VPN Policy
NAT / VM
FloodGate
VPN verify
VPN Enc
VPN Dec
IQ
Accounting
RTM
NIC
18
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
out chain
RTM
FloodGate / IQ
VPN Policy
in chain (19):
in chain (12):
4:
5:
6:
7:
8:
9:
9:
10:
11:
(fw)
(wire_vm)
(wire_vm)
10:
11:
12:
13:
14:
15:
16:
17:
4:
18:
5:
(wire_vm)
6:
7:
8:
19
(fw)
(wire_vm)
9:
10:
11:
12:
13:
14:
15:
VPN disabled
VPN enabled
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
fw monitor
Captures network traffic at different locations within the firewall chain
by inserting monitor modules into the firewall chain
Uses a INSPECT filter to capture the interesting traffic
Syntax (simplyfied)
fw monitor [e expr][-l len][-ci num][-co num][-m mask][-o
file]
Packets are inspected on 4 points by default, unless a mask is specified
-m option, example m iI
-e specifies an INSPECT code line
-l limits the number of bytes per packet to keep (default: all)
-o specifies an output file. The content can viewed later e.g. with
Wireshark.
-ci ond co: Stop after num packtes have been captured helpful on a
loaded machine with huge traffic
20
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
fw monitor (cont.)
Simple Examples
Track all traffic to or from a host that also relates to port 22 (sport or
dport):
fw monitor e accept host(168.185.163.124) and port(22);
-co1000
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
fw monitor (cont.)
INSPECT code generator http://decock.org/ginspect/
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
fw monitor (cont.)
[Expert@datgwy04a]# fw monitor -e "accept host(128.30.52.37);"
monitor: getting filter (from command line)
monitor: compiling
monitorfilter:
Compiled OK.
monitor: loading
monitor: monitoring (control-C to stop)
[fw_0] Lan1:i[60]: 163.157.6.68 -> 128.30.52.37 (TCP) len=60 id=57528
TCP: 53170 -> 80 .S.... seq=36a3fd54 ack=00000000
[fw_0] Lan1:I[60]: 163.157.6.68 -> 128.30.52.37 (TCP) len=60 id=57528
TCP: 53170 -> 80 .S.... seq=36a3fd54 ack=00000000
[fw_0] Lan5:o[60]: 163.157.6.68 -> 128.30.52.37 (TCP) len=60 id=57528
TCP: 53170 -> 80 .S.... seq=36a3fd54 ack=00000000
[fw_0] Lan5:O[60]: 163.157.6.68 -> 128.30.52.37 (TCP) len=60 id=57528
TCP: 53170 -> 80 .S.... seq=36a3fd54 ack=00000000
[fw_0] Lan5:i[56]: 128.30.52.37 -> 163.157.6.68 (TCP) len=56 id=0
TCP: 80 -> 53170 .S..A. seq=e480fe4d ack=36a3fd55
[fw_0] Lan5:I[56]: 128.30.52.37 -> 163.157.6.68 (TCP) len=56 id=0
TCP: 80 -> 53170 .S..A. seq=e480fe4d ack=36a3fd55
[fw_0] Lan1:o[56]: 128.30.52.37 -> 163.157.6.68 (TCP) len=56 id=0
TCP: 80 -> 53170 .S..A. seq=e480fe4d ack=36a3fd55
[fw_0] Lan1:O[56]: 128.30.52.37 -> 163.157.6.68 (TCP) len=56 id=0
TCP: 80 -> 53170 .S..A. seq=e480fe4d ack=36a3fd55
[fw_0] Lan1:i[52]: 163.157.6.68 -> 128.30.52.37 (TCP) len=52 id=62103
TCP: 53170 -> 80 ....A. seq=36a3fd55 ack=e480fe4e
[fw_0] Lan1:I[52]: 163.157.6.68 -> 128.30.52.37 (TCP) len=52 id=62103
TCP: 53170 -> 80 ....A. seq=36a3fd55 ack=e480fe4e
[fw_0] Lan5:o[52]: 163.157.6.68 -> 128.30.52.37 (TCP) len=52 id=62103
TCP: 53170 -> 80 ....A. seq=36a3fd55 ack=e480fe4e
[fw_0] Lan5:O[52]: 163.157.6.68 -> 128.30.52.37 (TCP) len=52 id=62103
TCP: 53170 -> 80 ....A. seq=36a3fd55 ack=e480fe4e
23
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
fw monitor (cont.)
[Expert@DEEDCDFGMNA001]# fw ctl chain
in chain (14):
0: -7f800000 (e2590ee0) (ffffffff) IP Options Strip (in) (ipopt_strip)
1: -70000000 (e2571c90) (ffffffff) fwmonitor (i/f side)
<- this is i
6:
(fw)
(wire_vm)
7:
8:
9:
side)
10:
11:
12:
13:
<- this is I
side)
<- this is o
(wire_vm)
7:
8:
9:
10:
<- this is O
[Expert@DEEDCDFGMNA001]#
24
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
OS IP Stack L3
o
Check Point
in chain
Check Point
out chain
Optional: Secure XL
OS NIC driver
eth0
25
tcpdum
p
OS NIC driver
eth1
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
26
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
27
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
30
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Questions?
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Thank you
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
References
Helpful documents
Check Point fw monitor manual
http://
www.checkpoint.com/techsupport/downloads/html/ethereal/fw_monitor_rev1_01.pdf
Extensive Troubleshooting guide from Tobias Lachmann
http://
blog.lachmann.org/wp-content/uploads/2010/09/2010-CPUG-CON-Tobias-Lachmann-Check-P
oint-Troubleshooting.pdf
Very nice KB article about performance related analysis
https
://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutionde
tails=&solutionid=sk33781
33
Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.