Network Protection Module Overview
Network Protection Module Overview
Course Agenda
• Module 1: Architecture and Troubleshooting basics
• Module 2: Network Protection
• Module 3: Web Protection
• Module 4: Email Protection
• Module 5: Web Server Protection
• Module 6: Authentication
• Module 7: Synchronized Security and Central Management
• Module 8: Virtual Private Networks
• Module 9: Wireless
• Module 10: High Availability
• Module 11: XGS Hardware and Troubleshooting
Page 2 of 130
Module 2 – Network Protection
Module objectives
Once you complete this module you will be able to:
ü Describe firewall flow and the XStream architecture
ü Understand and Troubleshoot Fastpath related issue
ü Troubleshoot the Rules and Policies
ü Troubleshoot Enterprise NAT
ü Understand and Troubleshoot Routing related issues and FRR
ü Understand SD WAN Load Balancing
ü Understand the Fine Tuning IPS settings available in the CLI
ü Understand the advanced firewall settings
ü Troubleshoot Advance deployment with VLAN and Extended Bridge
ü Troubleshoot Dynamic DNS and Jumbo Frame
ü Understand the SNMP Troubleshooting
Page 3 of 130
Module 2 – Network Protection
Page 4 of 130
Module 2 – Network Protection
Tables
Packet Filter
NAT
Page 5 of 130
Module 2 – Network Protection
• Packets undergo application classification, and are associated with an application where possible
• The packets pass through the packet filter based on the firewall rules
• If the packet is accepted it will be submitted to the IPS if it is applied to the matching firewall rule,
or it will go straight to POSTROUTING
[Click]
POSTROUTING
• If the packet is the first in the connection, the masquerading and SNAT policies are checked and
applied to the packet. For existing connections the already matched NATing policy is used
• The connection tracking module entries are updated
• If HA load balancing is enabled, the packet is sent to the load balancer
• Finally, Quality of Service is applied
Page 6 of 130
Module 2 – Network Protection
SSLVPN
Access
Packet Filter Server
Proxy
Proxy
HTTP
IPsec
WAF
Mail
AV
NAT
This scenario shows how the Sophos Firewall interacts with traffic that terminate on the device and new
traffic generated by the device, either inbound or outbound. For example, traffic for Web Server
Protection terminates on the Sophos Firewall on a virtual server, and a new onward connection is made to
the backend server that is being protected.
Firewall subsystems offer a way to intercept and manipulate the packets at the different positions in a
network stack in order to implement the firewall functionality. These subsystems are:
• Prerouting
• INPUT [System-destined]
• OUTPUT [System-generated]
• Postrouting
PREROUTING
• The prerouting module performs all of the same functions as if the packet was being forwarded
through the firewall as in the previous example
[Click]
INPUT
• The INPUT module applies to all packets that are destined for the device
• The packets pass through the packet filter based on the firewall rules defined
• If packet is accepted by the firewall it is directed to IPS & Application filter. It interfacing with IPS &
Application filter for forwarded and proxy traffic
• The connection tracking module entries are updated
• If the HA load balancer is configured it will process the packet, otherwise it will be submitted to
Local Processes
Page 7 of 130
Module 2 – Network Protection
[Click]
OUTPUT
• OUTPUT module applies to the traffic that is generated by the device
• Packets are submitted to the connection tracking module (Conntrack). If packet doesn’t match an
existing connection a new entry is created. If the packet matches an existing connection the packet
is associated with it. If the connection is Related (e.g. FTP connection) then a child connection entry
is added, which is then associated with it’s parent connection entry
• DNAT rules are applied to the packet
[Click]
• The packets pass through the packet filter based on the firewall rules defined
• The packet is submitted to the IPS if it is applied to the matching firewall rule, or it will go straight
to POSTROUTING
[Click]
POSTROUTING
• The postrouting module performs all of the same functions as if the packet was being forwarded
through the firewall as in the previous example
Page 8 of 130
Module 2 – Network Protection
Troubleshooting IPtables
Verify iptables
# iptables -nvxL
Chain INPUT (policy DROP 0 packets, 0 bytes) List of IPtables
pkts bytes target prot opt in out source destination optimization
0 0 ALLOW_ALL all -- * * [Link]/0 [Link]/0 skip_entry
0 0 HA_TRAFFIC all -- * * [Link]/0 [Link]/0 skip_entry
...............
IPtables list with line numbers
# iptables -nvxL --line-number
Chain INPUT (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
optimization
1 0 0 ALLOW_ALL all -- * * [Link]/0 [Link]/0 skip_entry
2 0 0 HA_TRAFFIC all -- * * [Link]/0 [Link]/0 skip_entry
...............
Display specific IPtable
# iptables -nvxL -t mangle
Chain PREROUTING (policy ACCEPT 6902 packets, 1509414 bytes)
pkts bytes target prot opt in out source destination optimization
1572 19811 ACCEPT all -- * * [Link]/0 [Link]/0 skip_ip_match
state UNTRACKED
0 0 ALLOW_ALL all -- * * [Link]/0 [Link]/0 skip_entry
0 0 HA_TRAFFIC all -- * * [Link]/0 [Link]/0 skip_entry
...............
To save/list IPtable configuration
# iptables-save
# Generated by iptables-save v1.6.2 on Wed Dec 4 18:41:48 2019
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
...............
Troubleshooting Iptables
Verify iptables
“iptables -nvxL ” Checking the status of IPTables / Firewall. Options “-L” (List ruleset), “-v” (Verbose) and “-
n” (Displays in numeric format).
[Click]
“iptables -nvxL --line-number ” Display IPTables rules with numbers. With the help of argument “–line-
numbers” you can append or remove rules.
[Click]
“iptables -nvxL -t mangle ” Display a specific table from Iptable
[Click]
“iptables-save ” To save/list the iptables configuration
Page 9 of 130
Module 2 – Network Protection
Troubleshooting IPsets
IPsets are a match extension for iptables
# ipset -L | more
Name: hb_green
Type: hash:ip List out all output of
..........
Name: hb_yellow IPset tables
Type: hash:ip
Revision: 4
..........
# ipset -L fwrules
Name: fwrules
List out detail about
Type: bitmap:fwrule firewall rule IPset
Number of entries: 5
Members:
FwRuleId=1,Action=ACCEPT,PolicyType=NETWORK
1,0,0,0,0
FwRuleId=2,Action=LOGDROP,PolicyType=USER
2,0,0,0,0
..........
# ipset -L localserviceset
List out detail about
Name: localserviceset particular set
Type: bitmap:service
Members:
1,tcpudp,6,1024,65535,80,80
2,tcpudp,6,1024,65535,4444,4444
..........
Troubleshooting Ipsets
IPsets are a match extension for iptables
ipset is a "match extension" for iptables. To use it, you create and populate uniquely named "sets" using
the ipset command-line tool, and then separately reference those sets in the match specification of one or
more iptables rules. A set is simply a list of addresses stored efficiently for fast lookup.
Advanced shell command
ipset -L : To list out all output of IPset tables
ipset -L <set name> : To list out detail about particular set
# ipset -L
Name: hb_green
Name: hb_yellow
Name: hb_red
Name: hb_lost
Name: hb_missing
Name: hb_magic
Name: heartbeat
Name: users
Name: scheme
Name: hotspotmacset
Name: hotspotusers
Name: lusers
Name: lusers6
Name: ip4ifacefpset
Name: ip6ifacefpset
Name: macifacefpset
Page 10 of 130
Module 2 – Network Protection
Name: l2host_##staticarp
Name: l2host_##staticneigh
Name: bandwidthset
Name: csvhost_##ALL_SSLVPN_RW
Name: csvhost_##ALL_SSLVPN_RW6
Name: fwrules
Name: tlsrules
Name: hostset
Name: serviceset
Name: localserviceset
Name: nonhttpserviceset
Name: l2host_##knownhosts
Name: l2host_##knownmachosts
Name: l2host_##ipmachosts
Name: l2host_##ipmachosts6
Name: vhostset
Name: MLM4WSTICKY
Name: MLM6WSTICKY
Name: appset
Name: deny_admin
Name: deny_admin6
Name: SYN_FLOODER_SRC
Name: UDP_FLOODER_SRC
Name: ICMP_FLOODER_SRC
Name: IP_FLOODER_SRC
Name: SYN_FLOODER_DST
Name: UDP_FLOODER_DST
Name: ICMP_FLOODER_DST
Name: IP_FLOODER_DST
Name: SYN_FLOODER_SRC6
Name: UDP_FLOODER_SRC6
Name: ICMP_FLOODER_SRC6
Name: IP_FLOODER_SRC6
Name: SYN_FLOODER_DST6
Name: UDP_FLOODER_DST6
Name: ICMP_FLOODER_DST6
Name: IP_FLOODER_DST6
[Click]
List out detail about firewall rule Ipset
# ipset -L fwrules
Name: fwrules
Type: bitmap:fwrule
Revision: 0
Header:
Size in memory: 65860
References: 6
Number of entries: 2
Page 11 of 130
Module 2 – Network Protection
Members:
FwRuleId=2,Action=ACCEPT,PolicyType=NETWORK
2,19167,3008431,87618,113909806
FwRuleId=5,Action=ACCEPT,PolicyType=NETWORK
5,0,0,0,0
[Click]
List out detail about particular set
# ipset -L localserviceset
Name: localserviceset
Type: bitmap:service
Revision: 0
Header: size 512
Size in memory: 8216
References: 56
Members:
1,tcpudp,6,1024,65535,80,80
2,tcpudp,6,1024,65535,4444,4444
4,tcpudp,6,1024,65535,22,22
5,tcpudp,17,1,65535,6060,6060,6,1024,65535,9922,9922
6,tcpudp,6,1024,65535,8090,8090
7,tcpudp,6,1024,65535,3128,3128
8,tcpudp,17,1,65535,53,53,6,1024,65535,53,53
9,icmp,1,8,0
10,tcpudp,6,1,65535,8443,8443
11,tcpudp,6,1024,65535,8091,8091
12,icmp,58,128,0
13,tcpudp,17,1,65535,1813,1813
14,tcpudp,6,1024,65535,2712,2712,17,1,65535,415,415,17,1,65535,8472,8472
15,tcpudp,6,1024,65535,273,273
16,tcpudp,6,1024,65535,179,179
17,tcpudp,6,1024,65535,1723,1723
18,tcpudp,17,1,65535,161,161
19,tcpudp,17,1,65535,520,520
20,tcpudp,17,1,65535,53,53,6,1024,65535,53,53
21,tcpudp,17,1,65535,1701,1701
22,tcpudp,17,1,65535,500,500,17,1,65535,4500,4500
23,tcpudp,6,1024,65535,25,25
24,tcpudp,6,1024,65535,464,464
25,tcpudp,6,1024,65535,142,142
26,tcpudp,6,1024,65535,109,109
27,tcpudp,6,1024,65535,994,994
28,tcpudp,6,1024,65535,992,992
29,tcpudp,6,1024,65535,2121,2121
32,tcpudp,17,1,65535,546,546,17,1,65535,547,547
33,tcpudp,6,1024,65535,8347,8347
34,tcpudp,6,1024,65535,3400,3400,17,1,65535,3410,3410,17,1,65535,3400,3400
37,tcpudp,6,1024,65535,8094,8094
Page 12 of 130
Module 2 – Network Protection
38,tcpudp,6,1024,65535,443,443
39,tcpudp,17,1,65535,520,520,6,1024,65535,179,179
40,ip,89,103,2
41,tcpudp,6,1024,65535,4501,4501,6,1024,65535,4502,4502
43,ip,210,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,1
65,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189
,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,211,212,213,214,2
15,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239
,240,241,242,243,244,245,246,247,248,249,250,251,252
45,tcpudp,6,1024,65535,65123,65123
46,servicegp,2,4,5,6,17,21,38
47,tcpudp,6,1024,65535,25,25,6,1024,65535,464,464
48,ip,1,89,2,103,41,4
49,tcpudp,6,1024,65535,25,25,6,1024,65535,464,464,6,1024,65535,142,142,6,1024,65535,109,109,6,1024
,65535,994,994,6,1024,65535,992,992,6,1024,65535,2121,2121
50,servicegp,7,47
51,tcpudp,6,1024,65535,22,22,6,1024,65535,8090,8090,17,1,65535,53,53,6,1024,65535,53,53,17,1,65535,
161,161,17,1,65535,53,53,6,1024,65535,53,53,6,1024,65535,25,25,6,1024,65535,464,464,17,1,65535,546,
546,17,1,65535,547,547
52,ip,58,41,4
53,tcpudp,6,1024,65535,25,25,6,1024,65535,464,464,6,1024,65535,142,142,6,1024,65535,109,109,6,1024
,65535,994,994,6,1024,65535,992,992
54,servicegp,7,51,52
55,ip,41
56,ip,4
57,tcpudp,17,546,547,546,547
61,servicegp,2,4,5,6,7,8,9,10,13,14,18,23,38,45
62,servicegp,2,4,6,7,8,10,12,18,23,38,45
63,servicegp,9,10,38
64,servicegp,10,12,38
65,servicegp,4,9,18,38
66,servicegp,4,12,18,38
69,servicegp,18,38
70,servicegp,18,38
71,servicegp
72,servicegp
73,servicegp,2,4,5,6,7,8,9,13,14,18,23,38,45
74,servicegp,2,4,6,7,8,12,18,23,38,45
75,servicegp,9,38
76,servicegp,12,38
Page 13 of 130
Module 2 – Network Protection
Xstream Architecture
Network
Flow
FastPath
DPI Engine
Xstream
Architecture
New SSL
Inspection
engine
Xstream Architecture
A new streaming packet processing architecture that provides extreme levels of protection, performance
and SSL policy is decoupled from firewall [Link] key components of the new architecture:
• Xstream DPI Engine - Deep packet threat protection in a single streaming engine for AV, IPS, Web, App
Control, and SSL Inspection. Deep packet threat protection in a single, high-performance streaming
engine with proxy-less scanning of all traffic for antivirus, IPS, and web threats as well as providing
application control and SSL inspection.
• Xstream SSL Inspection - Industry-leading performance, flexibility, and transparency into all SSL/TLS-
encrypted traffic. High-performance, high connection- capacity support for TLS 1.3 and all modern
cipher suites providing extreme SSL inspection performance across all ports, protocols, and
applications. It also comes equipped with enterprise-grade controls to optimize security, privacy, and
performance.
• Xstream Network Flow FastPath - Automatic and policy-based intelligent offloading of trusted traffic
processing at wire speed.
Page 14 of 130
Module 2 – Network Protection
Page 15 of 130
Module 2 – Network Protection
FastPath
Enabling FastPath and VFP/USFP kernel modules
console> system firewall-acceleration enable
Firewall Acceleration Enabled Successfully.
XG/SG/CR
# lsmod | grep vfp Hardware with
vfp_firewall 22200320 0 SFOS
debug_cntrs 16384 1 vfp_firewall
fp2sp_api 16384 1 vfp_firewall
......
FastPath
Enabling FastPath and VFP/USFP kernel modules
You can check the status of FastPath on the XG/XGS Firewall with the command:
console> system firewall-acceleration show
This command can also be used to enable and disable FastPath.
console> system firewall-acceleration enable
Firewall Acceleration Enabled Successfully.
console> system firewall-acceleration disable
Firewall Acceleration Disabled Successfully.
Virtual FastPath supports the NIC drivers i40e, e1000, e1000e, igb, ixgbe, and vmxnet3. VFP won’t load on
other drivers, but Sophos Firewall (including the DPI engine) still functions fully, but without
the FastPath performance enhancements. Currently, Virtual FastPath supports up to 3500 MTU on e1000
and e1000e NICs.
For virtual deployments, Virtual FastPath supports the VMware ESXi hypervisor. For other hypervisors,
such as KVM, turn off FastPath using the CLI command for firewall acceleration.
For XG/SG/CR Hardware with SFOS, With the command # lsmod | grep vfp we can verify that the vfp
module is loaded.
For XGS Hardware, With the command # lsmod | grep usfp we can verify that the usfp module is loaded.
Note: If the firewall-acceleration is enable/disable, the link state of the ports will bounce which would
fluctuate Interface.
Page 16 of 130
Module 2 – Network Protection
Troubleshooting FastPath
Using conntrack to detect offloaded traffic
# conntrack -L | grep [Link]
proto=icmp proto-no=1 timeout=29 orig-src=[Link] orig-dst=[Link] type=8 code=0 id=61219
packets=4 bytes=336 reply-src=[Link] reply-dst=[Link] type=0 code=0 id=61219 packets=4 bytes=336
mark=0x8001 use=1 id=1285035584 masterid=0 devin= devout=Port2 nseid=0 ips=0 sslvpnid=0 webfltid=0 appfltid=0
icapid=0 policytype=0 fwid=0 natid=0 fw_action=0 bwid=0 appid=0 appcatid=0 hbappid=0 hbappcatid=0
dpioffload=0 inzone=0 outzone=0 devinindex=0 devoutindex=6 hb_src=0 hb_dst=0 flags0=0x200000 flags1=0x0
flagvalues=21 catid=0 user=0 luserid=0 usergp=0 hotspotuserid=0 hotspotid=0 dst_mac=00:0c:29:04:ee:aa
src_mac=00:50:56:ef:85:67 startstamp=1567580922 microflow[0]=INVALID microflow[1]=INVALID hostrev[0]=0
hostrev[1]=0 ipspid=0 diffserv=0 loindex=0 tlsruleid=0 ips_nfqueue=0 sess_verdict=0 gwoff=0 cluster_node=0
current_state[0]=5 current_state[1]=5 vlan_id=0 inmark=0x0 brinindex=0 sessionid=129 sessionidrev=27792
session_update_rev=0 dnat_done=0 upclass=0:0 dnclass=0:0 pbrid_dir0=0 pbrid_dir1=0 conn_fp_id=NOT_OFFLOADED
Fastpath is
not offloaded
# conntrack -L | grep [Link]
proto=icmp proto-no=1 timeout=29 orig-src=[Link] orig-dst=[Link] type=8 code=0 id=1 packets=4
bytes=240 reply-src=[Link] reply-dst=[Link] type=0 code=0 id=1 packets=4 bytes=240 mark=0x8001 use=1
id=2422064384 masterid=0 devin=Port1 devout=Port2 nseid=0 ips=0 sslvpnid=0 webfltid=0 appfltid=0 icapid=0
policytype=1 fwid=5 natid=2 fw_action=1 bwid=0 appid=0 appcatid=0 hbappid=0 hbappcatid=0 dpioffload=0xd
sigoffload=0 inzone=1 outzone=2 devinindex=10 devoutindex=11 hb_src=0 hb_dst=0 flags0=0x800a0000200008
flags1=0x5c000804000 flagvalues=3,21,41,43,55,78,87,102,103,104,106 catid=0 user=0 luserid=0 usergp=0
hotspotuserid=0 hotspotid=0 dst_mac=7c:5a:1c:bc:06:ae src_mac=e8:d8:d1:45:62:89 startstamp=1617256606
microflowid[0]=5656 microflowrev[0]=0 microflowid[1]=5934 microflowrev[1]=0 hostrev[0]=1 hostrev[1]=1
ipspid=0 diffserv=0 loindex=11 tlsruleid=0 ips_nfqueue=0 sess_verdict=0 gwoff=0 cluster_node=0
Fastpath is
current_state[0]=12 current_state[1]=12 vlan_id=0 inmark=0x0 brinindex=0 sessionid=197 sessionidrev=18941
session_update_rev=1 dnat_done=0 upclass=0:0 dnclass=0:0 pbrid_dir0=0 pbrid_dir1=0 nhop_id[0]=8 nhop_id[1]=10
nhop_rev[0]=0 nhop_rev[1]=0 conn_fp_id=13 conn_fp_rev=2 offloaded
Troubleshooting FastPath
Using conntrack to detect offloaded traffic
If the connection is not offloaded that means traffic passes through the SlowPath which can be checked
from conntrack -L output for given conntrack will show conn_fp_id=NOT_OFFLOADED
If the connection is offloaded that means that traffic passes through the Fastpath then in that case :
conn_fp_id will display the fastpath connection id ex. conn_fp_id = 13
Note: connf_fp_id is based on the current state of conntrack, i.e it will tell that at that very moment
whether the conntrack is offloaded or not
Page 17 of 130
Module 2 – Network Protection
Troubleshooting FastPath
Slowpath Script – VFP & USFP
# sh /scripts/firewall/slowpath_debug_cntrs.sh
br_nhop_err : 0
create_conn_err : 0
del_conn_err : 0
l2_nhop_err : 0
l3_nhop_err : 0
lag_nhop_err : 0
lif_update : 20
modify_conn_err : 0
offload_error : 68
reclaim_conn_err : 0
reclaim_conn_incr : 36
skip_bridge_offload : 0
skip_helper_module : 30
skip_mflow_invalid : 0
skip_offload_dos : 0
skip_offload_ipv6 : 0
skip_offload_qos : 0
track_conn_err : 0
track_conn_incr : 155
traffic_flow_fp : 192 tcpdump forces all traffic flow
through slowpath
# tcpdump -ni any host [Link]
Troubleshooting FastPath
Slowpath Script – VFP & USFP
The slowpath counter can help us to identify any errors where data is originally marked for fastpath which
then fallsback to the slowpath.
For example, if a tcpdump is being run, this will force all traffic to be sent through the slowpath. If this
were the case, the offload_error counter will be incremented.
Note: A detailed breakdown of fastpath troubleshooting can be found in the following articles:
[Link]
[Link]
h
Page 18 of 130
Module 2 – Network Protection
Troubleshooting FastPath
VFP troubleshoot script
• Creates a tarball of useful info for debugging VFP
o Includes system info, syslog, debug counters, fastpath tables, nic driver info,
conntrack info, general system state info.
# sh /bin/fp_firewall_troubleshoot
Troubleshooting FastPath
VFP troubleshoot script
If an issue arises where fastpath is suspected to be the issue, it is important to collect all relevant fastpath
information by running the following script for future use.
# cd /var/vfp
# ls
log vfp_troubleshoot_2020-02-16_20-55-42
# tar -xzvf vfp_troubleshoot_2020-02-16_20-[Link]
Page 19 of 130
Module 2 – Network Protection
Troubleshooting FastPath
USFP Fastpath Script
• Creates a tarball of useful info for the debugging
o Includes FastPath Counters, Daq/Snort Info, XFP RPC counters, Interface config,
Interface counters, Netmap info, Slowpath counters, System utilization, Kernel
counters, XGS Platform info, Marvell NPU dump, x86/NPU logs, Tuning info,
Versions.
# sh /bin/fp_firewall_troubleshoot
Page 20 of 130
Module 2 – Network Protection
Troubleshooting Firewall
Rules and Policies
Page 21 of 130
Module 2 – Network Protection
Page 22 of 130
Module 2 – Network Protection
Page 23 of 130
Module 2 – Network Protection
Page 24 of 130
Module 2 – Network Protection
# firewall --save
--id 5 --position 5 --family 0 --action ACCEPT --state ON --policy-type 1 --web-filter-id
0 --app-filter-id 0 --dscp-mark -1 --ips-id 0 --src-hb OFF --dst-hb OFF --src-zone 1 --
dst-zone 2 --src-network 0 --dst-network 0 --service 0
--id 6 --position 2 --family 0 --action ACCEPT --state ON --policy-type 1 --web-filter-id
0 --app-filter-id 0 --dscp-mark -1 --ips-id 0 --src-hb OFF --dst-hb OFF --src-zone 1 --
dst-zone 2 --src-network 372 --dst-network 373 --service 0 --log-firewall
Page 25 of 130
Module 2 – Network Protection
Destination Zone: 2
Blocked Source Zone: None
Blocked Destination Zone: None
Source network: Any
Destination network: Any
Blocked source network: None
Blocked destination network: None
Service: Any
Destination Ports: Any
The command “firewall –save” helps us to get more details about firewall rule which shows set of
parameter which are linked with IPSET.
For example :- If --dst-zone 2 that means if we check this ID with IPSET then it will show respective Zone
with ID marked as 2
EAP3# psql -U nobody -d corporate -c "select * from tblnetworkzone where zoneid=2"
zoneid | zonename | zonetype | description | system_zone | displaystatus | moveable
--------+----------+----------+-------------+-------------+---------------+----------
2 | WAN | 2| | 1| 1| 1
(1 row)
Verify the firewall chain with iptables
We have single template for a firewall chain in IPTABLES i.e. FIREWALL.
Earlier, in v17 we use to have multiple iptables chains for every firewall rule which was causing multiple
issue at the time of update/delete/add of firewall rule.
v17 Firewall chain
Chain fw1_mark_mpre (1 references)
target prot opt source destination optimization
ENTITY all -- [Link]/0 [Link]/0 skip_ip_match ENTITY TARGET WEBFLT 0 APPFLT
0 FWID 1 MMFLAGS 512 POLICYTYPE 1
HB_SRC_NO_RESTRICTION all -- [Link]/0 [Link]/0 skip_entry
ACCEPT all -- [Link]/0 [Link]/0 skip_ip_match
Chain fw5_mark_mout (2 references)
target prot opt source destination optimization
ENTITY all -- [Link]/0 [Link]/0 skip_ip_match ENTITY TARGET WEBFLT 0 APPFLT
3 FWID 5 CTFLAGS 33555466 SCANFLAGS 72 MMFLAGS 512 POLICYTYPE 1
Chain fw6_mark_mout (2 references)
target prot opt source destination optimization
Page 26 of 130
Module 2 – Network Protection
Page 27 of 130
Module 2 – Network Protection
Page 28 of 130
Module 2 – Network Protection
NAT
Page 29 of 130
Module 2 – Network Protection
1 2 3 4 5 6 7
NAT lookup for Dst. zone will FW rule SNAT or
all rules be changed matching Linked NAT
(excluding as per DNAT would be as per rule
linked NAT) rule. done for would be
post-NAT applied
zone and
pre-NAT IP
Page 30 of 130
Module 2 – Network Protection
Troubleshooting NAT
Using conntrack
# conntrack -E | grep [Link]
[NEW] proto=icmp proto-no=1 timeout=30 orig-src=[Link] orig-
dst=[Link] type=8 code=0 id=1 [UNREPLIED] reply-src=[Link] reply-
dst=[Link] type=0 code=0 id=1 mark=0x8001 id=25578944 masterid=0
devin=Port1 devout=Port2 nseid=0 ips=0 sslvpnid=0 webfltid=0 appfltid=0
icapid=0 policytype=1 fwid=5 natid=2 fw_action=1 bwid=0 appid=0
appcatid=0 hbappid=0 hbappcatid=0 dpioffload=0x1 inzone=1 outzone=2
devinindex=5 devoutindex=6 hb_src=0 hb_dst=0 flags0=0x800a8000200000
flags1=0x800000 flagvalues=21,39,41,43,55,87 catid=0 user=0 luserid=0
usergp=0 hotspotuserid=0 hotspotid=0 dst_mac=00:0c:29:04:ee:a0
src_mac=00:0c:29:f5:fa:4c startstamp=1567211027 microflow[0]=INVALID
microflow[1]=INVALID hostrev[0]=0 hostrev[1]=0 ipspid=0 diffserv=0
loindex=6 tlsruleid=0 ips_nfqueue=0 sess_verdict=0 gwoff=0 cluster_node=0
current_state[0]=5 current_state[1]=0 vlan_id=0 inmark=0x0 brinindex=0
sessionid=92 sessionidrev=19168 session_update_rev=1 dnat_done=0
upclass=0:0 dnclass=0:0 pbrid_dir0=0 pbrid_dir1=0 nhop_id[0]=65535
nhop_id[1]=65535 nhop_rev[0]=0 nhop_rev[1]=0 conn_fp_id=NOT_OFFLOADED
Troubleshooting NAT
Using conntrack
If we look at an example, conntrack entries for the relevant connection is mark natid as 2.
This commands shows Stateful inspection table in the CLI. Shows proto type, proto number, connection
timeout, source & destination port number, Firewall rule ID, web filter ID, App filter ID, Interface and zone
details, source & destination MAC details.
Page 31 of 130
Module 2 – Network Protection
Troubleshooting NAT
Verify NAT settings in the nat_rule.log
2019-09-09 14:11:18: NAT - executing cmd : nat add --id 5 --position
3 --state 1 --family 0 --masq --dst-vhost-type 0 --translated-dst
372 --translated-service 49 --original-dst 370 --original-service 63
--out-interface Port2
2019-09-09 14:11:20: NAT - executing cmd : nat add --id 4 --position
4 --state 1 --family 0 --translated-src 376 --dst-vhost-type 0 --
override_out_interface Port1 --override_translated_src 373 --
override_is_masquerade 0
2019-09-09 17:23:09: NAT - executing cmd : nat add --id 7 --position
1 --state 1 --family 0 --masq --dst-vhost-type 0
2019-09-09 17:23:22: NAT - executing cmd : nat delete --id 7 --
family 0
Troubleshooting NAT
Verify NAT settings in the nat_rule.log
When troubleshooting firewall rule related issues, nat_rule.log file should be checked
We will be getting multiple events like ADD, DELETE, UPDATE at the the time of changes with all NAT rules.
Verify NAT setting in the configuration database
# psql -U nobody -d corporate -c "select * from tblnatrule" -x;
-[ RECORD 1 ]-------+-----------------------------------------------
id |2
name | #NAT_Default_Network_Policy
description |
isenable |1
translatedsourceid |
translateddestid |
translatedserviceid |
ipfamily |0
position |2
fwruleid |
ismasq |1
Page 32 of 130
Module 2 – Network Protection
ismigrated |0
lbmethod |
monitorindex |
islive |f
createdat | 2019-08-30 23:28:11.954577+05:30
updatedat |
The command psql -U nobody -d corporate -c "select * from tblnatrule" ; will display the NAT attributes
like id, name, description etc.
We have database table enhancement with v18 in which we have below list of new database tables for
NAT
List of relations
Schema | Name | Type | Owner
--------+----------------------------+-------+--------
config | tblnatinboundinterfacerel | table | pgroot
config | tblnatinterfacewiserel | table | pgroot
config | tblnatoriginaldestrel | table | pgroot
config | tblnatoriginalservicerel | table | pgroot
config | tblnatoriginalsourcerel | table | pgroot
config | tblnatoutboundinterfacerel | table | pgroot
config | tblnatrule | table | pgroot
Page 33 of 130
Module 2 – Network Protection
Troubleshooting NAT
Verify NAT setting using nat list
# nat list
[count:0 last-hit:Unused] nat --id 3 --position 1 --state 1 --family
0 --fwid 0 --original-dst 370 --original-service 63 --dst-vhost-type
0 --translated-src 0 --translated-dst 372 --translated-service 49
[count:0 last-hit:Unused] nat --id 6 --position 2 --state 1 --family
0 --fwid 0 --original-src 372 --masq --dst-vhost-type 0 --
translated-src 0 --translated-dst 0 --translated-service 0
[count:0 last-hit:Unused] nat --id 5 --position 3 --state 1 --family
0 --fwid 0 --original-dst 370 --original-service 63 --out-interface
Port2 --masq --dst-vhost-type 0 --translated-src 0 --translated-dst
372 --translated-service 49
Troubleshooting NAT
Verify NAT setting using nat list
The NAT utility can be helpful for troubleshooting NAT related issues
The command "nat list" displays all configured NAT rules in the appliance where it assign an ID to every
configuration tracked in the database.
Verify the IPset for each ID from the nat list output and then match it with our configuration.
Original-dst
# ipset -L | grep HOSTID=370
HOSTID=370,TYPE=ip,IP=[Link]
Translated-dst
# ipset -L | grep HOSTID=372
HOSTID=372,TYPE=ip,IP=[Link]
Original-service
# ipset -L serviceset | grep 63
63,tcpudp,6,1,65535,2000,2000
Translated-service
# ipset -L serviceset | grep 49
49,tcpudp,6,1,65535,23,23
Page 34 of 130
Module 2 – Network Protection
Page 35 of 130
Module 2 – Network Protection
Routing Polices
By default, Static routing has the highest priority; this can be viewed on the console, and changed if
necessary using the system route_precedence command.
The commands for managing route precedence are:
system route_precedence show - Display current route precedence
system route_precedence set sdwan_policyroute vpn static - Set new route precedence
Default route precedence:
• Static routes
• SD-WAN policy routes
• VPN routes
Here is an example of the routing table on Sophos Firewall. You can see that it uses a combination of the
source and fwmark to lookup gateways. The table will be followed from top to bottom based on the
routing precedence. The following packet journey is taken.
A few points to note:
[Click]
0: from all lookup local : Match when Sophos Firewall sends traffic to itself
[Click]
01: from all fwmark 0x1001 lookup gw1/gw2 : Probe traffic (This is the traffic generated when we
perform a health check from the WebAdmin)
Page 36 of 130
Module 2 – Network Protection
[Click]
51: from all fwmark 0x4001 lookup gw1/gw2/gw3 : Match SD WAN traffic if marked
[Click]
53: from all lookup main : Static routes including static, dynamic and directly connected networks
[Click]
54: from all fwmark 0x200 lookup routeipsec0 : IPSEC tunnel routes marking
[Click]
150: from all fwmark 0x8002 lookup gw1/gw2/gw3/ : RTG (Route Through Gateway)
[Click]
220: from all iif lo lookup 220 : System generated traffic and IPsec VPN
[Click]
221: from all lookup multilink : Default Routing (Review this)
• Packets are only marked for one of PBR, RTG or MLM
PBR: Policy Based Route
RTG: Route Through Gateway
MLM: Multi Link Management
• If a packet is marked for RTG the XG will still traverse the full route precedence, but will not be able
to match PBR because the fwmark will be different
• RTG will always have a lower precedence than VPN and static
Page 37 of 130
Module 2 – Network Protection
Routing Precedence
On the left, we have manually set the route precedence as SD-WAN routes > VPN routes > Static routes >
Default routes. On the right, We have the routing table linked to the different types of routes.
Let’s see how a packet for a destination flows through the routing precedence.
The packets will travel from the order shown (From SD-WAN to Default route) and identify the appropriate
matching routing table.
• DST A packet travels the same way and finds it’s next hop as we have configured it in the routing
table. Here, we do a marking (0x4001) to influence the default kernel routing.
• DST B packet travels the same way and finds an appropriate route, and a firewall marking (0x200) is
also done.
• Similarly, the DST E packet travels the same way and finds it’s appropriate route.
• Finally, the DST C packet travels through the same precedence, but there’s no route configured in
the routing table for this packet. Since there’s no route configured, the packet will flow through the
default route, which is MLM (Multi-Link Management) in this case and a firewall marking (0x8003)
is done.
Every traffic will have its Firewall mark that defines how the traffic should be routed. For example, The
routing here does not have the information about an application or user. We use a ‘mark identity’, which
finds the gateway for the application and the user. These marking are used to gain a higher level of
routing.
Page 38 of 130
Module 2 – Network Protection
Page 39 of 130
Module 2 – Network Protection
# ip address show
5: Port1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast group 0x01 nfmark 0
nfmark6 0 nettype 0x01 state UNKNOWN group default qlen 1000
inet [Link]/24 brd [Link] scope global Port1
7: Port3: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast group 0x01 nfmark 0 nfmark6 0
nettype 0x01 state DOWN group default qlen 1000
inet [Link]/24 brd [Link] scope global Port3
# ip route show
[Link]/24 dev Port2 proto kernel scope link src [Link]
[Link]/24 dev tun0 proto kernel scope link src [Link]
[Link]/24 dev GuestAP proto kernel scope link src [Link] linkdown
[Link]/24 dev Port3 proto kernel scope link src [Link]
[Link] via [Link] dev tun0
[Link]/24 dev Port1 proto kernel scope link src [Link]
Page 40 of 130
Module 2 – Network Protection
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
[Link] [Link] [Link] U 0 0 0 Port2
[Link] [Link] [Link] U 0 0 0 tun0
[Link] [Link] [Link] U 0 0 0
GuestAP
[Link] [Link] [Link] U 0 0 0 Port3
[Link] [Link] [Link] UGH 0 0 0 tun0
[Link] [Link] [Link] U 0 0 0 Port1
Page 41 of 130
Module 2 – Network Protection
Configuration files
For saving the configuration, files are used instead of a database for dynamic routing daemons, as it is the
natural method used by FRRouting.
The FRRouting (FRR) engine:
is an open-source routing protocol suite for Unix and Linux platforms.
Here at Sophos, we have integrated this open-source code into the Sophos firewall to provide various
routing protocol capabilities such as BGP, OSPF, IS-IS, and RIP.
FRRouting has been adopted since v19.5 and aims to offer high performance, scalability, and stability
compared to the old QUAGGA engine used in past firmwares like v18+ and v19.0.
All configuration files are located at /conf/routing.
Page 42 of 130
Module 2 – Network Protection
Main1.
Menu
Configure RIP Router
1. Configure
ManagementRIP 1. Configure
Unicast Routing RIP
Configuration
2. Configure OSPF 2. Configure OSPF 2. Configure OSPF
1. Configure
3. Network Configuration
BGP 3.1. Configure
ConfigureBGPUnicast Routing 3. [Link] BGPRIP
Configure
2. Configure
4. System Configuration
OSPFv3 4.2. Configure
ConfigureOSPFv3
Multicast Routing 4. [Link] OSPFv3
Configure OSPF
0.
3. Exit
Route Configuration 0.0. Exit
Exit 0. [Link]
Configure BGP
4. Device Console 4. Configure OSPFv3
Select MenuManagement
5. Device Number: 2 Select
SelectMenu
MenuNumber:
Number 1[0-2]: Select Menu Number: 3
0. Exit
Trying
6. [Link]...
VPN Management Trying [Link]... Trying [Link]...
Connected to localhost. Device
7. Shutdown/Reboot Connected to localhost. Connected to localhost.
Select Menu Number:
Escape
0. character
Exit is '^]'. Escape character is '^]'. Escape character is '^]'.
ospf> list rip> list bgp> list
Select
show Menu Number [0-7]:
version show version show version
list [permutations] list [permutations] list [permutations]
exit exit exit
quit quit quit
help help help
enable enable enable
terminal length (0-512) terminal length (0-512) terminal length (0-512)
terminal no length terminal no length terminal no length
show commandtree [permutations] show commandtree [permutations] show commandtree [permutations]
Sophos Firewall v19.5 FRR provides support for CLI commands where the dynamic routing protocols can be
configured from the CLI.
Main Menu à Route Configuration à Configure Unicast Routing à Select the respective routing method.
Page 43 of 130
Module 2 – Network Protection
Debug logs
Model: SFVUNL
Hostname: v19.5test
Unicast Routing Configuration
1. Configure RIP
2. Configure OSPF
3. Configure BGP
4. Configure OSPFv3
0. Exit
Select Menu Number: 2
Trying [Link]...
Connected to localhost.
Escape character is '^]'.
ospf> enable
ospf# debug ospf
(1-65535) Instance ID
bfd Bidirection Forwarding Detection
default-information OSPF default information
event OSPF event information
graceful-restart OSPF Graceful Restart
ism OSPF Interface State Machine
ldp-sync OSPF LDP-Sync information
lsa OSPF Link State Advertisement
nsm OSPF Neighbor State Machine
nssa OSPF nssa information
packet OSPF packets
sr OSPF-SR information
te OSPF-TE information
ti-lfa OSPF-SR TI-LFA information
zebra Zebra information
ospf# debug ospf lsa
Above are the debug logs for the respective dynamic routing protocols.
The image at the bottom indicates the configuration files for the dynamic routing protocols.
To enable debug logging, enter ‘debug ospf <type of events>. For example, debug ospf lsa.
To disable debug logging, enter ‘no debug ospf <type of events>. For example, no debug ospf lsa.
To view the debug status, enter show debugging
Upon enabling the debug, you can see the log files under /log directory.
Refer [Link] for more
information on the Debug logs.
Page 44 of 130
Module 2 – Network Protection
IPv6 Integration
Page 45 of 130
Module 2 – Network Protection
Copyright © 2023 Sophos Ltd
IPv6 Prefix Delegation (IPv6-PD) is a mechanism that allows an Internet Service Provider (ISP) to assign a
range of IPv6 addresses to a customer's network, enabling the customer to further subdivide and assign
IPv6 addresses within their network.
Overview:
IPv6 Prefix Delegation enables ISPs to allocate a portion of their IPv6 address space to customers
dynamically, empowering them to manage their own subnets efficiently.
Example:
Imagine an ISP allocates the IPv6 prefix 2001:db8:1234::/48 to a residential customer. Using IPv6 Prefix
Delegation, the customer's router can then dynamically request a subset of this prefix, such as
2001:db8:1234:1::/64, for use within their home network. With this delegated prefix, the customer can
then assign unique IPv6 addresses to devices within their network, enabling seamless connectivity to the
broader IPv6 internet
Page 46 of 130
Module 2 – Network Protection
Copyright © 2023 Sophos Ltd
DHCP-PD Deployment
Many ISPs use DHCP-PD to allocate IPv6 addresses to customer premise devices, and for
allocating IPv6 subnet prefixes for customers' internal networks.
Page 47 of 130
Module 2 – Network Protection
Distribution: With the allocated prefix, the SFOS configures its LANs and Zones. Every client on the
network then receives IPv6 addresses through Router Advertisement.
To know more about the DHCP Prefix delegation support, refer
[Link]
+DHCP+Prefix+Delegation+Support
Verifying DHCP-PD
1. Refresh the page after waiting for some time after saving the DHCP-PD configuration.
2. Click on the Menu option on the right.
3. You will now see a new field “DHCP PD” displaying the leased prefix from the ISP along with the
prefix length.
4. Next, configure the downstream interface connecting to the LAN network.
Page 49 of 130
Module 2 – Network Protection
Page 50 of 130
Module 2 – Network Protection
Copyright © 2023 Sophos Ltd
Page 51 of 130
Module 2 – Network Protection
Page 52 of 130
Module 2 – Network Protection
DHCPv6 Solicit packet with Option 25 indicating desire to use of Prefix Delegation
The Wireshark capture shows that the DHCPv6 Solicit packet sent by client includes option 25 (Identity
Association for Prefix Delegation) which tells the Delegating router that we want to use prefix delegation.
DHCPv6 Solicit packet with Option 25 and Option 26 indicating a preferred delegated
prefix and prefix length
The Wireshark capture shows that the DHCPv6 Solicit packet includes option 25 along with option 26 (IA
Prefix) which tells the Delegating router that we want prefix address 2a01:db8:: and prefix length 56.
Page 53 of 130
Module 2 – Network Protection
DHCPv6 Solicit packet with Option 25 and Option 26 indicating a preferred prefix length
but no preferred address
The Wireshark capture shows that the DHCPv6 Solicit packet includes option 25 along with option 26 (IA
Prefix) which tells the Delegating router that we want prefix of length 56 (with no preferred address).
Page 54 of 130
Module 2 – Network Protection
Page 55 of 130
Module 2 – Network Protection
Troubleshooting
/log/[Link]
• Search for the word “prefix” if a prefix was chosen
/log/[Link]
Packet captures for ports 546 and port 547
required for diagnosing delegations
Jul 21 11:42:33Z Received system event is prefixup for interface Interface=Port2,IPfamily
= 1, action = BOUND6 Delegated Prefix = 2a01:db8:1:3000::, Prefix netmask = 56, Preferred
Lifetime = 310,Valid Lifetime = 315, Old Delegated Prefix = , Old Prefix netmask =
Jul 21 11:42:33Z dyniface:systemevent_handler Calling prefixup event for Prefix
2a01:db8:1:3000::/56
Jul 21 11:42:33Z dyniface:systemevent_handler Updating Port2 prefix and netmask in DB to
2a01:db8:1:3000:: and 56 respectively on prefixup event. Updating Prefix Valid lifetime to
315 and Prefix Preferred lifetime to 310
Jul 21 11:42:33Z dyniface:systemevent_handler Successfully updated prefix in DB.
Jul 21 11:42:33Z dyniface:systemevent_handler Dynamic Interface Port2 prefixup Event
Completed Successfully.
[Link]
• Log activity when Prefix Delegation is enabled on Upstream Interface.
Jul 21 11:42:33Z Received system event is prefixup for interface Interface=Port2, IPfamily = 1, action =
BOUND6
Delegated Prefix = 2a01:db8:1:3000::, Prefix netmask = 56, Preferred Lifetime = 310, Valid Lifetime = 315,
Old Delegated Prefix = , Old Prefix netmask =
Jul 21 11:42:33Z dyniface:systemevent_handler Calling prefixup event for Prefix 2a01:db8:1:3000::/56
Jul 21 11:42:33Z dyniface:systemevent_handler Updating Port2 prefix and netmask in DB to 2a01:db8:1:3000::
and 56 respectively on prefixup event.
Updating Prefix Valid lifetime to 315 and Prefix Preferred lifetime to 310
Jul 21 11:42:33Z dyniface:systemevent_handler Successfully updated prefix in DB.
Jul 21 11:42:33Z dyniface:systemevent_handler Dynamic Interface Port2 prefixup Event Completed Successfully.
Page 56 of 130
Module 2 – Network Protection
[Link]
• Log activity on Downstream interface, when the upstream interface already has Prefix
Delegated to it.
Jul 21 12:18:23Z edit_interface: For IPAssignment type Delegated, generate IPv6 address
Jul 21 12:18:23Z gen_downstream_addr: Called with upstream_iface=Port2, downstream_iface=Port3,
downstream_suffix=::0:0:0:0:1
Jul 21 12:18:23Z add_prefix_tosubnet: Called with parameters upstream_prefix=2a01:db8:1:3000::,
upstream_prefix_nm=56 and downstream_suffix=::0:0:0:0:1
Jul 21 12:18:24Z add_prefix_tosubnet: IPv6 address 2a01:db8:1:3000::1 generated for Downstream interface Port3
...
Jul 21 12:18:30Z interface_notifier: opcode radvd_server_on_delegated For PHYSICAL Interface and Post Edit
Interface.
Jul 21 12:18:30Z radvd_server_on_delegated: Interface= Port3
Jul 21 12:18:30Z radvd_server_on_delegated: Add RADVD server on delegated interface
...
Jul 21 12:18:31Z Router Advertisement created successfully.
RADVD, which stands for Router Advertisement Daemon, is an open-source software application used for
IPv6 network autoconfiguration. It plays a key role in IPv6 network setup by advertising the network's IPv6
routing information, prefixes, and other configuration details to client devices on the network. RADVD
operates by sending Router Advertisement (RA) messages periodically to notify devices of the available
IPv6 configuration parameters.
Here's how RADVD works:
1. Router Advertisement (RA): RADVD runs on a router within an IPv6 network. It periodically sends
Router Advertisement (RA) messages to the local network segment. These RA messages contain
vital information about the network, including the IPv6 prefixes, the default gateway, and other
network configuration details.
2. Client Configuration: Devices within the network receive these RA messages. When a device
receives an RA message, it can automatically configure its IPv6 address, set the default gateway,
and configure other network parameters without manual configuration.
3. Efficient Network Setup: RADVD simplifies and automates the process of setting up IPv6 networks.
It is particularly helpful in environments where dynamic IPv6 address allocation is used, and it
ensures that devices can communicate on the network without extensive manual configuration.
RADVD is commonly used in Linux-based routers and is available as an open-source software package for a
variety of platforms. It is a crucial component for enabling IPv6 autoconfiguration in many networks.
Page 57 of 130
Module 2 – Network Protection
Copyright © 2023 Sophos Ltd
• In SFOSv20, any ISP prefix changes are automatically distributed to all connected clients.
• In real world scenario, prefix changes will not be immediate as ISP’s use a very long lease time.
• Clients may continue to use their old IPv6 address until the preferred/valid lifetime expires, after
this they will switch to their new addresses.
Relevant postgres table:
psql –d corporate –U nobody –c “select * from tbldhcpv6clientconf” –x
• tbldhcpv6clientconf - table showing the prefix delegation for interfaces
• tbldelegatedconf - table related to router delegation of the prefix for internal/downstream
interfaces.
• tblraclientconf - table related to the router advertisement server(RA server) configuration.
Page 58 of 130
Module 2 – Network Protection
Prefix lengths supported include /48, 52, 56, 60. If prefix length is not supported, the downstream interface
will not be configured.
To troubleshoot prefix length issues, analyze the “[Link]” file and search for “prefix”.
Prefix of auto-created RA server cannot be modified. If needed, manually create RA server and configure to
advertise desired prefix.
• Prefix Delegation over PPPoE is currently not supported by the firewall and the firewall also does
not support PPPoE over IPv6.
• Supported prefix lengths include /48, 52, 56, 60. If the prefix length is not supported, the
downstream interface will not be configured.
• To troubleshoot prefix length issues, analyze the [Link] file and search for the keyword ‘prefix’.
• The prefix length for downstream interface fixed at /64.
• The prefix assigned to the auto-created RA server cannot be modified. If you wish to advertise an
additional prefix, you can manually create an RA server and configure it to advertise the prefix of
choice.
• The firewall currently does not support the implementation of a DHCPv6 server on the downstream
interface.
Page 59 of 130
Module 2 – Network Protection
Subnet id should be added to the leased prefix on Upstream interface to create a /64
prefix for the downstream interface
Page 60 of 130
Module 2 – Network Protection
Troubleshooting
SD-WAN Policy Routing
Page 61 of 130
Module 2 – Network Protection
Updating, adding and deleting policy routes on A policy route lookup is now performed for
the backend is approximately 9 times faster reply packets
Page 62 of 130
Module 2 – Network Protection
Page 63 of 130
Module 2 – Network Protection
Office A Office B
N IPsec VPN WA
WA N
Sophos Firewall A Sophos Firewall B
Failover
D MZ D MZ
MPLS
Server
Client Sophos Firewall applies policy Sophos Firewall applies policy
route to send the traffic over the route to the reply traffic to send
preferred link it over the preferred link
SD-WAN Policy Route scenario: Let’s consider a scenario where there are two links between Office A and
Office B. For this example we will use an IPsec VPN which uses the WAN link and an MPLS connection that
is connected to the Sophos Firewall s in the DMZ zone, however these could be other types of link.
Previously, when the Client in Office A connected to the Server in Office B, Sophos Firewall A would apply
the policy route to send the traffic over the preferred link, the MPLS link in this scenario. Sophos Firewall B
however, would not apply the policy route to the reply traffic, so it would route via the WAN zone. This is
why in version 17 of Sophos Firewall this scenario only worked if the MPLS link was attached to an
interface in the WAN zone.
From version 18 and above, Sophos Firewall B will apply policy routing decisions to the reply traffic, which
means it will be routed via the MPLS even if it is not in the WAN zone, such as in this example where it is in
the DMZ.
Customers can enable the feature with the console command ‘set routing sd-wan-policy-route reply-
packet enable’ set routing sd-wan-policy-route system-generate-traffic enable
Note the Policy route to SD-Wan Policy Route migration behaviour:
• Sophos Firewall automatically prefixes the firewall rule ID to the policy route name
• Sophos Firewall uses the firewall rule ID to match traffic with migrated routes
• SD-WAN policy routes have no zone-based settings
• The sequence of migrated policy routes is corresponding to the firewall rule sequence and cannot
be changed
• If a firewall rule is deleted, the migrated policy route is deleted as well
• Only the gateways and the gateway monitoring decisions can be changed in a migrated policy
route.
Page 64 of 130
Module 2 – Network Protection
SD-WAN
Best quality SLA
• Can select >2 links, including
custom gw & RBVPN gw
Page 65 of 130
Module 2 – Network Protection
SD-WAN
Custom SLA configuration
• Admin can configure maximum
allowed disruptions
• Links satisfying configured SLA will be
selected
• Recommendation on SLA values for
commonly used Applications
• Separate SLA values based on Latency/
Jitter/ Packet Loss
64
Page 66 of 130
Module 2 – Network Protection
SD-WAN profiles
Summary of the SLAs
• All details in a single view
65
Page 67 of 130
Module 2 – Network Protection
SLA Behaviour
• If no Gateways meet the SLA, the traffic will be routed using the first available gateway.
Page 68 of 130
Module 2 – Network Protection
Interva
l
1s
• Latency, Jitter and Loss are calculated based on last x probes (default 30). Range 5 to 100.
• Time it takes to report first verdict (profile configured/updated/link resorted) = sample count x interval
Page 69 of 130
Module 2 – Network Protection
Health Check
Gateway Health Check SD-WAN Profile Health Check
Health Check
There are two types of Health check.
1. Gateway Health Check: This is used by MLM and RTG.
2. SD-WAN profile health check: This helps us to check the SD-WAN profile status for all the gateways.
We may have multiple profiles created and so all the gateways will be checked and individual
results will be provided for each gateway.
Page 70 of 130
Module 2 – Network Protection
Page 71 of 130
Module 2 – Network Protection
SD-WAN route
SD-WAN route
A basic UI Improvement in SD-WAN feature. You can view the data usage in SD-WAN route, view
application information and manage the rule.
Page 72 of 130
Module 2 – Network Protection
SD-WAN Logging
• SD-WAN routing information added in firewall logs – includes SD-WAN rule
id, name, for both request and reply direction
72
SD-WAN Logging
We can see the traffic passing through the desired gateway/link in the Firewall logs under Log Viewer.
We also have a separate option for SD-WAN in the log viewer where we can identify the "Route change
events" and "Health check events”.
Page 73 of 130
Module 2 – Network Protection
Earlier version of firewall had the option to move a route to a different position using the drag and drop
feature however it will be difficult when there are too many routes.
With v20, it is now possible to move the route to any position. To move, click on the ‘More’ icon to the
right of the rule and enter the position number to which you want the route to be moved to. For example,
if you want to move the route to the first position, then type 1.
More flexibility to configure the SDWAN rule.
1. Option to move SDWAN route to nth position
2. Option to create SDWAN route at top or bottom.
3. Option to clone SDWAN route above or below the specific route.
4. Option to add SDWAN route above or below the specific route
Page 74 of 130
Module 2 – Network Protection
With the v19.5, we have a limit of 1024 gateway which is insufficient for the SDWAN deployments built
upon higher-end appliances like 2U or 1UL.
With v20, we have a new gateway configuration limit.
New gateway configuration limit:
1. DT1 appliances - 64
2. 1UL appliances - 2048
3. 2U appliances - 3072
4. All other appliances – 1024
For more information, refer:
[Link]
+and+GW+limit+increase
Page 75 of 130
Module 2 – Network Protection
Page 76 of 130
Module 2 – Network Protection
Page 77 of 130
Module 2 – Network Protection
Page 78 of 130
Module 2 – Network Protection
Page 79 of 130
Module 2 – Network Protection
Page 80 of 130
Module 2 – Network Protection
Page 81 of 130
Module 2 – Network Protection
Go to the command-line console and use this command: show routing sd-wan-policy-route reply-packet
You can turn off SD-WAN policy routing for reply packets.
If all these scenarios occur, Sophos Firewall enforces the generic SD-WAN policy route before static routes
and implements it on system-generated traffic and reply packets too. Access to the web admin and SSH
consoles is lost from the internal subnet specified in the policy route. However, access is available from
other subnets.
Page 83 of 130
Module 2 – Network Protection
# ps -w | grep dgd
dgd 928 887 root 26504 23100 S {dgd} csc -L 3 -w -c /_conf/[Link]
dgd 10329 928 root 150m 2972 S dgd -f /cfs/system/dgd/[Link]
grep 10465 9078 root 22928 2800 S grep dgd
# kill -1 <pid of [Link] process>
# touch /var/tmp/debug_dgd Temporary dgd debugging
# rm –rf /var/tmp_debug_dgd
Permanent NOTICE level debugging
Page 84 of 130
Module 2 – Network Protection
To toggle debugging off, the same process can be repeated using the new/same PID
• Permanent Notice level logging:
The command to enable dgd notice level logs is ‘touch /var/tmp/debug_dgd’
To revert permanent Notice debug logs, remove the file using: rm -rf /var/tmp/debug_dgd
Page 85 of 130
Module 2 – Network Protection
# ls -lah [Link]
-rw-r--r-- 1 root 0 68.8K Dec 23 14:18 [Link]
# tail -f /log/[Link]
DBG Nov 27 06:29:25 [Worker] event_loop: event on fd 8
DBG Nov 27 06:29:25 [Worker] message_complete_cb: PUT body:
{"appId": 106,"proto": 17,"family":
2,"dst_ip": "[Link]","dst_port": 53}
In high availability, the cached application-based routing information is synchronized over the dedicated
HA link using multicast IP [Link] on port 4455
Application-based routes require an active Web Protection license and one of the following:
• Application classification is on, which it is by default
• An application filter is applied to the firewall rule
• Or the application is part of the offload signatures and is flowing through snort
appcached service is responsible of forwarding Tuple details from Snort to redis-appache and IPSet for PBR
to identify the application-based connection
redis-appcache service is used as a cache server, keep track of the application IPSet TTL value and if expires
after 3600, then update appcache to remove app from IPSet.
[Link] is a log file provide tuple information details i.e. appId": 106,"proto": 17,"family":
2,"dst_ip": "[Link]","dst_port": 53
Page 87 of 130
Module 2 – Network Protection
v19.5
SD-WAN Load Balancing
Page 89 of 130
Module 2 – Network Protection
v20
v19.5
v19.0
Page 90 of 130
Module 2 – Network Protection
SD-WAN performance
Upon creation of SD-WAN profiles and assigning it to the SD-WAN routes, we can monitor the performance
of each gateway from Diagnostics à SD-WAN performance.
Page 91 of 130
Module 2 – Network Protection
Using Load
balancing
Page 92 of 130
Module 2 – Network Protection
When there’s traffic or a new connection, it is processed and is routed through a specific gateway based on
SD-WAN load balancing profile configuration.
[Click]
Dependencies - Re-route feature behavior (Enabled by default)
If one of the gateway is down, the traffic will be re-routed over any of the other available gateways.
To see if the re-route feature is enabled/disabled, Run the following command from the console:
console> show routing reroute-connection
To enable traffic redirection, you can run the following command from the console:
console> set routing reroute-connection <enable/disable>
Page 93 of 130
Module 2 – Network Protection
1. OFF OFF OFF Don't care, No Events, All gateways are assumed to be up.
2. OFF OFF ON Load balance as soon as at least one gateways becomes available.
4. ON x x If all gateways are down for given profile, ipset is added with first gateway of the profile.
This picture explains the routing behavior when a condition such as SLA/Health check is not met.
Multiple gateways
used for load
balancing
We can see all the logs such as ‘Health check and Route change events’ related to SD-WAN profiles from
the log [Link]
[Link]
WAN+traffic+load+balancing for more information.
Page 94 of 130
Module 2 – Network Protection
Page 95 of 130
Module 2 – Network Protection
Packet 2
WAN Packet 3 Retransmission
Packet 2 Packet 1 LAN
Malicious Code
Page 96 of 130
Module 2 – Network Protection
Once the connection is set-up, data is transferred. When data transfer is completed, the conversation
ends. The stream module is use in these conversations where IPS builds internal tables to represent these
sessions and tears them down after each session ends.
For example in Telnet session, stream preprocessor will keep on assembling packets until termination
request (0x0d0a0d0a) is received.
TALOS IPS
TALOS IPS
The IPS signatures will only be on the firewall when Network Protection is subscribed (license) and when
IPS is in use.
Turning off the IPS feature will give us an alert “The firewall removes the IPS signatures if you don’t turn
IPS protection back on within 30 days”.
The behavior of the IPS feature based on the license is explained in the image.
• Evaluation/Paid license – Once enabled, The IPS signatures are downloaded if there’s an active
license. The downloaded signatures will be available as long as the feature remains On.
• Eval license expired -- Displays an alert stating “Can’t turn it on as license expired” when we try
to enable the feature. The downloaded signatures will be deleted after 30 days.
• Paid license expired -- Displays an alert stating “Can’t turn it on as license expired” when we try
to enable the feature. The downloaded signatures will be deleted after 30 days if the feature is
turned of. However, the downloaded signatures will be available if the feature remains On.
Page 97 of 130
Module 2 – Network Protection
• Sophos Support should advise the customer to create an IPS signature exception for the
relevant signature/s.
• Exception of the config path: Edit the relevant policy in Intrusion Prevention > IPS policies,
add the concerned signature on top, and set the action to Allow packet.
• For any false-positive cases, raise the query with SophosLabs via Lab Requests. Adding a
workaround (IPS signature exception) must be followed if the customer agrees or prefers it.
• Contact GES if there are further issues or concerns.
Page 98 of 130
Module 2 – Network Protection
• Turn off the feature/s via CLI if the false-positive rates are very high or if the customer does
not get convinced.
• There is a potential performance impact of up to 20% reduced throughput for decrypted
HTTPS. If this becomes a problem, the admin may turn off the feature via CLI.
• Sophos Support or GES must only advise this option as a last resort as it will turn off the
extra security benefits provided by the feature. In the vast majority of cases, an IPS
exception will be all that is needed.
• Inspection of decrypted HTTPS traffic should remain turned on (decryption and port-
agnostic inspection can be toggled independently).
• Raise the query with SophosLabs via Lab Requests.
• Contact GES if there are further issues or concerns
Page 99 of 130
Module 2 – Network Protection
Maxsesbytes :- The maxsesbytes-settings allows you to set the maximum allowed file size to be scanned by
IPS. Any file larger the configured size is bypassed and is not scanned. This value is applied per session.
maxpkts :- Sets the number of packets sent for application classification. By default this is set to 8 but can
be changed to send all packets or any number of packets above 8.
enable_appsignatures :- Turns app-based signatures on or off for IPS. App signatures determine the
application that is using a specific data stream to help ascertain if traffic is malicious or harmless. By
default app-based signatures are enabled.
http_response_scan_limit :- Sets the scan limit for HTTP response packets. Available values are 0-262144,
for full scanning this should be set to 0.
search_method ac-bnfa :- Set the search method to be used for IPS signature pattern matching. ac-bnfa
(low memory usage, high performance) ac-q (high memory usage, best performance) hyperscan (low
memory usage, best performance)
sip_preproc :- Specify if SIP preprocessor is enabled or not. Enabling it will scan all SIP sessions to prevent
any network attacks.
sip_ignore_call_channel :- Set whether the audio and video data channels should be ignored. Enable this
option to ignore such channels
inspect untrusted-content :- Flow will be offloaded to fast path when engine detects that all
IPS/App/Web/AV inspections can be offloaded
Note: with XG version 18 the firewall should automatically run one IPS instance per available core, up to
v17.5 additional instances can be added using a console command.
Similar output is available from ips_conf also:-
console> show ips_conf
config stream 1
config maxsesbytes 0
config stdsig 1
config qnum 10
config maxpkts 8
config disable_tcpopt_experimental_drops 0
config enable_appsignatures 1
var SEARCH_METHOD ac-q
var SIP_STATUS enabled
var IGNORE_CALL_CHANNEL enabled
var TCP_POLICY windows
var LOCAL_RULE [Link]
var DETECT_ANOMALIES no
var TCP_BLOCK nblock
config inspect_content untrusted
config sacmaxpkts 8
config failclose off
config snaplen 1514
Note: this can still be useful when troubleshooting performance issues related to the IPS engine on v18. On
appliances running v17.5 or older this command should be used to start additional instances per core to
improve performance.
Troubleshooting IPS
Reading the debug [Link]
[Dec 03 15:18:51 :11641]:verdict 0 pktnum 1 flowoff [WEB|AV] appcat
[0:0] dsize 0 [[Link]:55033 -> [Link]:443]
[Dec 03 15:18:51 :11641]:verdict 0 pktnum 1 flowoff [WEB|AV] appcat
[0:0] dsize 0 [[Link]:443 -> [Link]:55033] Modules which
are skippedappcat
[Dec 03 15:18:51 :11641]:verdict 0 pktnum 2 flowoff [WEB|AV]
[0:0] dsize 0 [[Link]:55033 -> [Link]:443]
[Dec 03 15:18:51 :11641]:SetAppid: appid 100 catid 5 sid 1200016
dsize 517 [[Link]:55033 -> [Link]:443]
Final action to
be taken
Troubleshooting IPS
Reading the debug [Link]
[Web|AV] – Web and AV modules are skipped
[Click]
Appid 100 – It is a unique application ID for which information can be verified from database
[Click]
Catid 5 – It is the application category ID of the previously identified Application
what functionalities are being skipped – look for flowoff [IPS|WEB|AV]
if session is offloaded to fast path – look for flowoff [SESSION]
verdict - the action to be taken on the packet after scanning
0 - Allow the packet
1 - Drop the packet
4 - Drop the session
7 - Hold the packet until next verdict (introduced in v18 for WebInSnort)
8 - Offload the session (introduced in v18 for flow offload)
pktnum -# of packet from client/server side
flowoff [ ] -# current state of flow offload, what inspections, if any, are being skipped at the moment
appcat [x:y] – appid x, appcat id y
Using conntrack
You can also get IPS policy no, application ID, application category ID, firewall rule ID by looking at
conntrack table. You should use grep to look at the specific conntrack entries.
proto=tcp proto-no=6 timeout=9 state=TIME_WAIT orig-src=[Link] orig-dst=[Link] orig-
sport=50315 orig-dport=443 packets=42 bytes=2801 reply-src=[Link] reply-dst=[Link] reply-
sport=443 reply-dport=50315 packets=74 bytes=86224 [ASSURED] mark=0x8001 use=1 id=597632896
masterid=0 devin=Port3 devout=Port2 nseid=16778242 ips=5 sslvpnid=0 webfltid=0 appfltid=1 icapid=0
policytype=1 fwid=5 natid=0 fw_action=1 bwid=0 appid=215 appcatid=16 hbappid=0 hbappcatid=0
dpioffload=0xc inzone=1 outzone=2 devinindex=7 devoutindex=6 hb_src=0 hb_dst=0
flags0=0xa0002200008 flags1=0x100810000 flagvalues=3,21,25,41,43,80,87,96 catid=14 user=0 luserid=0
usergp=0 hotspotuserid=0 hotspotid=0 dst_mac=00:0c:29:04:ee:b4 src_mac=00:0c:29:f5:fa:4c
startstamp=1575300455 microflow[0]=INVALID microflow[1]=INVALID hostrev[0]=0 hostrev[1]=0 ipspid=0
diffserv=0 loindex=6 tlsruleid=0 ips_nfqueue=0 sess_verdict=0 gwoff=0 cluster_node=0 current_state[0]=9
current_state[1]=9 vlan_id=0 inmark=0x0 brinindex=0 sessionid=4087 sessionidrev=766
session_update_rev=5 dnat_done=0 upclass=0:0 dnclass=0:0 pbrid_dir0=0 pbrid_dir1=0 nhop_id[0]=65535
nhop_id[1]=65535 nhop_rev[0]=0 nhop_rev[1]=0 conn_fp_id=NOT_OFFLOADED
ips=5 - IPS Policy ID marked for this connection
appid=21 - App ID for this connection
appcatid=16 - App category ID
Spoof
prevention Packets that have passed the DoS check Spoof No
flowchart Enable?
Yes
IPMAC_Filter
No Violation Yes No
Drop Traffic Connection Tracking Module
When connecting to FTP server, the client sends a PORT command specifying the IP address and port to
which the FTP server should connect and send data. The FTP Bounce attack is when an attacker sends a
PORT command specifying the IP address of a third party instead of the attacker's own IP address. The FTP
server then sends data to the victim machine.
By Default, FTP Bounce Prevention is always on and it is set to Controlling the FTP connection.
There are two method to stop FTP Bounce Attack:
Control : Controlling the FTP connection
Data : Controlling the Data connection
Established TCP Connection Idle Timeout
• Connections that are closed (ACK for a FIN) are removed from the connection table. If the
connection isn't observed to be closed it stays open - either because it's still active, or because the
UTM didn't see it being closed (it's a stale connection that the endpoints intended to close but the
appliance somehow didn't see it).
• This value resets whenever a packet is seen in the connection, but iptables applies this value from
beginning to end. If you make this value too short then a valid connection that is passing data will
be removed after that time period.
• Default Idle timeout value for the established TCP connection is 10800 seconds (3 hours). This value
can be changed using below command:
console> set advanced-firewall tcp-est-idle-timeout <value in Seconds>
<2700-432000> Number in given range (inclusive)
Midstream Connection Pickup
• The Midstream Connection Pickup is OFF by default.
• It can be used to avoid downtime for the first time deployment in the bridge mode.
• It identifies the existing connections at the time of bridge mode deployment and creates conntrack
entries to avoid packet drops for ongoing sessions.
NAT Policy for System originated traffic
A local NAT policy is used when you want the appliance to go forward with a different IP, rather than its
masqueraded IP. Local NAT is used when traffic originating from the appliance (such as webcat updates, AV
definition updates, or IPS updates) need to reach the Internet. If the device has multiple WAN links
terminated on it and the requirement is to reach the Internet using a specific IP address for all Device
generated traffic, Local NAT can be used to define which IP will be used for traffic that originates from the
Sophos Firewall.
In order for the appliance-generated traffic to reach the Internet, the appliance needs a public IP which can
be configured by using the following command from the console window:
set advanced-firewall sys-traffic-nat add destination <IP or network> netmask <netmask> snatip
<assigned Public IP>
By entering this command, all of the appliance-generated traffic will be NATed with the entered public IP.
Conntrack –E expect: To get detail info about the connection which are expected based on the existing
connection. Like wise in SATC we add expected connection from particular user and when actual request
comes we relate it with it’s actual connection.
To verify loaded helper modules, use below command in the console:
console> system system_modules show
pptp loaded
h323 loaded
tftp loaded
irc loaded
sip not loaded
To load helper module, use below command:
console> system system_modules <module name> load
ports Provide comma separated port list <Maximum 8 ports>
<ENTER> Further Arguments are optional
Troubleshooting
VLAN
Troubleshooting VLAN
Console commands
console> system bridge max_bridge_members show
64 Bridge Member limit
# brctl show
bridge name bridge id STP enabled Routing
Asmmetric_path Unknown_Network VLAN allowed Default VLAN
interfaces
GuestAP 8000.f266d6f4d76d no no no
no no 0
Bridge configuration
Troubleshooting VLAN
Console commands
VLAN enhancements
• VLAN interfaces can be created on unbound physical interfaces with no zone or network
configuration.
• VLAN interface can be a member of bridge
• VLAN interface can be configured on Bridge
• VLAN interface on Bridge members
• VLAN interface on Unbinded Physical Interface
• Limit maximum number of bridge members to 64
• VLAN filtering is possible in bridge interface and VLAN ID 1 can be configured now
system bridge max_bridge_members set limit <2-256> :- To configure the max limit of members that can
be added to bridge.
[Click]
The database table “tblinterface” give information about bridge interface
[Click]
brctl show :- It shows us detail about bridge configuration
Use case scenario:-
1) Three Physical interface, not physically bridged. Three separate VLAN created - one on each.
Bridged those three VLANs. Routing on the Physical interfaces should work as normal. Traffic can
be configured to be routed from physical interface to one of the VLAN( ex. PortA to PortB,
PortA.100 to PortC.100, br0 to PortB)
2) Three Physical interface, physically bridged. Three separate VLAN created - one on each. Bridged
those three VLANs. Routing on Physical interfaces should work as normal. Traffic can be configured
to be routed from a physical interface to one of the VLANs or between VLANs. (ex. PortA to PortB
via br1, br1 to br0, PortA.100 to PortC.100, PortA to PortB)
3) Three Physical interface, physically bridged. Three separate VLAN created - one on each. Routing on
physical interface should work as normal. Traffic can be configured to be routed from physical
interface to one of the VLAN or between VLANs.(ex PortA to PortB, PortA.100 to PortB.100, br0 to
PortD Internet traffic)
4) Three Physical interface, physically bridged. Two VLAN created that bridges all three physical.
Routing on physical interface should work as normal. Traffic can be configured to be routed from
Physical interface to one of the VLANs or between VLANs(ex. PortB to PortC, br0 to br0.100,
br0.100 to br0.200, br0.100 to PortD)
5) Two Physical interface, configured separately. One VLAN is created on each. Bridge is created with
one Physical and 2 VLAN interfaces ()
Troubleshooting VLAN
Verifying filtering settings
# psql -U nobody -d corporate -c "select * from tblbridgedetail"
interface | routingallow | asymallow | unknetworkallow | description | allowvlan | vlan |
arpbroadcast | stp | maxage | macaging | filtervlan | filterethertype
-----------+--------------+-----------+-----------------+-------------+-----------+------
+--------------+-----+--------+----------+------------+-----------------
bridge1 | 0 | 1 | 1 | | 1 | 0 |
1 | 0 | 20 | 300 | 1 | 0
(1 row)
# psql -U nobody -d corporate -c "select * from tblbridgevlanfilter" Vlan Filtering is enabled
interface | permittedvlans
-----------+----------------
bridge1 | 100 VLAN configuration for
bridge1 | 1-10
specific interface
# bridge -c vlan show dev Port3
port vlan ids Permitted VLAN for
Port3 5
specific Interface
# bridge vlan
port vlan ids
Port3 5 List of all VLAN
Port4 6 configuration
Port5 9
Troubleshooting VLAN
Verifying filtering settings
• Vlan filter helps us to add enable/disable VLAN filter(Permitted VLAN tags) for bridge interface so
that VLANs may pass over a bridge and the firewall can filter and enact policy on the tagged traffic,
without requiring an interface in the VLAN
• All Untagged traffic is allowed regardless of VLAN Filtering configuration.
• Only bridged traffic will be filtered, any system destined or routed traffic will not get filtered.
The tblbridgedetail and tblbridgevlanfilter will store the value that VLAN filtering is enabled or
not (Enhanced existing table).
[Click]
bridge -c vlan show dev Port3 command will give configured permitted VLAN in compressed form.
[Click]
bridge vlan or bridge vlan show both commands will give complete list of VLAN's configured on that dev
For packet flow
drppkt - to list the dropped packets
tcpdump - to analyze the packet flow
conntrack - to list the connectione details.
# ls -lah | grep "csc\|applog\|networkd"
-rw-r--r-- 1 root 0 16.9M Dec 4 14:47 [Link]
Note:
• The STP option on bridge is disabled in HA setup
• When the "Filter Ethertype filtering" is on by default the bridge allows the following frames
- ARP, IPv4, IPv6, 8021Q, EXTE
• The Bridge without IP, the following configuration won't work
- Legacy Proxy
- MASQ between different type of interface within bridge
Verify database entries
# psql -U nobody -d corporate -c "select * from tbllogtypes where logtype = 'Bridge ACLs’”
logtypeid | logtype | parentid | status | systemid | displaylable
-----------+-------------+----------+--------+----------+---------------------
115 | Bridge ACLs | 1| 0| 86 | [Link]
# psql -U nobody -d corporate -c "select * from tblbridgedetail"
interface | routingallow | asymallow | unknetworkallow | description | allowvlan | vlan | arpbroadcast |
stp | maxage | macaging | filtervlan | filterethertype
-----------+--------------+-----------+-----------------+-------------+-----------+------+--------------+-----+--------+----------+----
--------+-----------------
br0 | 0 | 1 | 1 | | 1 | 0 | 0 | 0 |
20 | 300 | 0 | 1
# psql -U nobody -d corporate -c "select * from tblbridge_ethertype_rel”
interface | ethertype | isdefault
-----------+-----------+-----------
br0 | 8688 | 0
br0 | 0900 | 0
By default, a bridge configured on Sophos XG only forwards IP packets. If you want additional protocols to
be forwarded, you have to add their EtherType to this box.
# drppkt –i Port3
Date=2019-11-14 Time=08:14:36 log_id=0186371 log_type=Firewall log_component=Bridge ACLs
log_subtype=EtherType filtering log_status=Deny log_priority=Alert duration=N/A in_dev=Port3
out_dev=Port4 inzone_id=0 outzone_id=0 source_mac=56:00:00:00:00:00 dest_mac=08:00:00:00:00:00
ether_type=Unknown (0x7558) l4_protocol=0 fw_rule_id=N/A policytype=0 live_userid=0 userid=0
user_gp=0 ips_id=0 sslvpn_id=0 web_filter_id=0 hotspot_id=0 hotspotuser_id=0 hb_src=0 hb_dst=0
dnat_done=0 icap_id=0 app_filter_id=0 app_category_id=0 app_id=0 category_id=0 bandwidth_id=0
up_classid=0 dn_classid=0 nat_id=0 cluster_node=0 inmark=0x0 nfqueue=0 gateway_offset=0 connid=0
masterid=0 status=0 state=0, flag0=0 flags1=0 pbdid_dir0=0 pbrid_dir1=0
Country Mapping
Troubleshooting incorrect country mapping
• Utilize MaxMind database for IP Address mapping
• Periodic updates over up2date
• [Link]
Country Mapping
Troubleshooting incorrect country mapping
In an incident that an IP address is incorrectly classified with the wrong country, it is likely that the Sophos
Firewall GeoIP up2date packages have not yet updated. These updates are done intermittently compared
to other up2date packages. Usually every 1-3 months.
The first recommended step is use [Link] and enter the IP address in question to validate the
country – most of the time, this IP will contain the correct country. However when you look on the Sophos
Firewall and run an ip2country lookup from the console using:
console> show country-host ip2country ipaddress <address>
This may display the outdated/incorrect country. If this is the case you’ll have to just suggest to the
customer to wait for the next GeoIP upd2ate package. For the time being, a manual firewall rule can be
created in its place.
# cat /cfs/ddclient/[Link]
daemon=300
ssl=yes
timeout=120
......
# /sdisk/ddclient/[Link]
• Jumbo frame in Sophos Firewall is supported for both IPv4 and IPv6 families.
• VFP/NFP supports jumbo frames.
• VPN, RED and WiFi interfaces, IP tunnel, GRE are not planned to support jumbo frames.
By default, the PPPoE interface supports a payload of 1492 Bytes. Now to accommodate a payload higher
than 1492, RFC-4638 supports an MTU of upto 1500B (Baby Jumbo Frames) on PPP interface if the
underlying physical interface supports at least 1500 MTU.
CLI command to verify/update MTU/MSS value:
console> show network mtu-mss <interface no.>
console> set network mtu-mss <interface no.> mtu <new mtu value> mss <new mss value>
console> set network mtu-mss Port1 mtu 9000 mss default
console> show network mtu-mss Port1
MTU MSS
--- ---
9000 8960
Troubleshooting SNMPv3
Verify communication and configuration
# tcpdump -nvvv port 161 or port 162
2019-07-11 15:43:32 <UNKNOWN> [UDP: [[Link]]:35726->[[Link]]:162]: Tracing SNMP
iso.[Link].[Link] = Timeticks: (25930) 0:04:19.30 iso.[Link].[Link].1.0
= OID: iso.[Link].1.2064.[Link] iso.[Link].1.2064.[Link] = STRING: "SF01V_SO01_SFOS 18.0.0 Alpha
" iso.[Link].1.2064.[Link] = STRING: "SFOS 18.0.0 Alpha" iso.[Link].1.2064.[Link] = STRING: "SFDemo-
5d273ab" iso.[Link].1.2064.[Link] = STRING: "notification-device" iso.[Link].1.2064.[Link] = Hex-STRING:
07 E3 07 0B 0F 2B 1F iso.[Link].1.2064.[Link].0 = STRING: " Alert_Id : 17513 Message : New Firmware Up2Date
is available for installation"
# cat /cfs/system/[Link]
agentAddress udp:161,udp6:161 SNMP
sysName SFOS
syslocation India Configuration file
sysContact Admin
CreateUser 'SFOS' SHA256 "Sophos19851985" AES "Sophos19851985"
rouser 'SFOS'
authtrapenable 1
trapsess -v 3 -Ci -u "SFOS" -a SHA256 -A "Sophos19851985" -x AES -X "Sophos19851985" -l authPriv [Link]
monitor -u 'SFOS' -r 5 -e linkUpTrap 'Generate linkUp' '.[Link].[Link].1.8' != 2
monitor -u 'SFOS' -r 5 -e linkDownTrap 'Generate linkDown' '.[Link].[Link].1.8' == 2
notificationEvent linkUpTrap '.[Link].[Link].5.4' '.[Link].[Link].1.1' '.[Link].[Link].1.2'
'.[Link].[Link].1.7' '.[Link].[Link].1.8'
notificationEvent linkDownTrap '.[Link].[Link].5.3' '.[Link].[Link].1.1' '.[Link].[Link].1.2'
'.[Link].[Link].1.7' '.[Link].[Link].1.8’
# tail -f /log/[Link]
2020-10-28 16:08:54 snmpd: send_trap: Timeout SNMP Log file
2020-10-28 16:08:55 snmpd: send_trap: Timeout
Troubleshooting SNMPv3
Verify communication and configuration
Support for SNMPv3 is added, providing more flexibility and security over SNMPv2.
SNMP (Simple Network Management Protocol) gives access to Sophos Firewall information such as: status
of the firewall, service availability, CPU, memory, and disk usage. Sophos Firewall now supports SNMPv3
users in addition to SNMPv1 and SNMPv2c protocols, ensuring confidentiality, message integrity, and
validity of the user.
Run a tcpdump to verify that the SNMP query (port 161) and trap (port 162) is transferred to the
customers management solution.
Check the [Link] file under /cfs/system/ to see the agent configuration and passwords.
Log file Path :- /log/[Link]
The configuration should also be verified in the configdb:
# psql -U nobody -d corporate -c "select * from tblsnmpmanagerconf"
id | name | source | username | password | v1 | v2c | v3 | security | descript
ion | trapv1 | trapv2c | trapv3 | encryptalgo | authalgo | encryptkey | mib
object | authtype
----+------+--------+----------+----------+----+-----+----+----------+---------
----+--------+---------+--------+-------------+----------+----------------+----
-------+----------------
1| | | admin | | 0| 0| 1| |
| 0| 0| 1| 1| 2 | Sophos19852019 |
| Sophos19852019
(1 row)
# psql -U nobody -d corporate -c "select * from tblsnmpv3trapiplist"
username | ipaddress
----------+-------------
SFOS | [Link]
(1 row)
Note: Customers can download a Management Information Base (MIB) from our documentation website:
[Link]
Quality of Service
Flow monitor
Auto-refresh
Session total count
Quality of Service
Flow monitor
We have below list of enhancements with v18 for Flow monitoring live connection
• Auto Refresh
• WAN Originated Traffic should also be displayed under Live connections
• Live Bandwidth calculation
• Application categories for each connection
Module Objectives
On completion of this module you are now able to:
ü Describe firewall flow and Troubleshooting
ü Describe the XStream architecture
ü Understand and Troubleshoot Fastpath related issue
ü Troubleshoot the Rules and Policies
ü Troubleshoot Enterprise NAT
ü Understand and Troubleshoot Routing related issues
ü Understand the Fine Tuning IPS settings available in the CLI
ü Understand the advanced firewall settings
ü Troubleshoot Advance deployment with VLAN and Extended Bridge
ü Troubleshoot Dynamic DNS and Jumbo Frame
ü Understand the SNMP Troubleshooting