Collect Sophos XG Firewall logs
This document explains how to collect Sophos Next Gen (XG) Firewall logs by using Bindplane. The parser extracts logs, normalizes the key-value pairs, and maps them to the UDM. It handles various log formats, converting timestamps, enriching network data, and categorizing events based on log IDs and network activity.
Before you begin
- Ensure that you have a Google Security Operations instance.
- Ensure that you are using Windows 2016 or later, or a Linux host with systemd.
- If running behind a proxy, ensure firewall ports are open.
- Ensure that you have privileged access to Sophos XG Firewall.
Get Google SecOps ingestion authentication file
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Collection Agents.
- Download the Ingestion Authentication File. Save the file securely on the system where Bindplane will be installed.
Get Google SecOps customer ID
- Sign in to the Google SecOps console.
- Go to SIEM Settings > Profile.
- Copy and save the Customer ID from the Organization Details section.
Install the Bindplane agent
Windows installation
- Open the Command Prompt or PowerShell as an administrator.
- Run the following command: - msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux installation
- Open a terminal with root or sudo privileges.
- Run the following command: - sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
Additional installation resources
- For additional installation options, consult this installation guide.
Configure the Bindplane agent to ingest Syslog and send to Google SecOps
- Access the configuration file: - Locate the config.yamlfile. Typically, it's in the/etc/bindplane-agent/directory on Linux or in the installation directory on Windows.
- Open the file using a text editor (for example, nano,vi, or Notepad).
 
- Locate the 
- Edit the - config.yamlfile as follows:- receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels: log_type: SYSLOG namespace: sophos_firewall raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
- Replace the port and IP address as required in your infrastructure. 
- Replace - <customer_id>with the actual customer ID.
- Update - /path/to/ingestion-authentication-file.jsonto the path where the authentication file was saved in the Get Google SecOps ingestion authentication file section.
Restart the Bindplane agent to apply the changes
- To restart the Bindplane agent in Linux, run the following command: - sudo systemctl restart bindplane-agent
- To restart the Bindplane agent in Windows, you can either use the Services console or enter the following command: - net stop BindPlaneAgent && net start BindPlaneAgent
Configure Sophos Firewall syslog servers
- Sign in to the Sophos XG Firewall.
- Go to Configure > System services > Log settings.
- In the Syslog servers section, click Add.
- Provide the following configuration details:
- Name: enter a unique name for the Google SecOps collector.
- IP address/Domain: enter the Bindplane IP address.
- Port: enter the Bindplane port number.
- Facility: select DAEMON.
- Severity level: select Information.
- Format: select Device standard format.
 
- Click Save.
- Return to the Log Settings page and select the specific log types to forward to the syslog server.
Configure Sophos XG Firewall Log Settings
- Select the following Base firewall (security policy log) logs:
- Policy rules
- Invalid traffic
- Local ACLs
- DoS attack
- Dropped ICMP redirected packet
- Dropped source routed packet
- Dropped fragmented traffic
- MAC filtering
- IP-MAC pair filtering
- IP spoof prevention
- SSL VPN tunnel
- Protected application server
- Heartbeat
 
- Select the following Web protection (web filtering log and application filtering log) logs:
- Web filter
- Application filter
 
- Select the following Network protection (IPS log) logs:
- Anomaly
- Signature
 
- Select the following System log log:
- System events
 
UDM Mapping Table
| Log Field | UDM Mapping | Logic | 
|---|---|---|
| activityname | security_result.detection_fields.activityname | Value from the activitynamefield. | 
| app_category | security_result.detection_fields.Application Category,application_category | Value from the app_categoryfield. | 
| app_filter_policy_id | security_result.detection_fields.app_filter_policy_id | Value from the app_filter_policy_idfield. | 
| app_is_cloud | security_result.detection_fields.app_is_cloud | Value from the app_is_cloudfield. | 
| app_name | principal.application | Value from the app_namefield. | 
| app_resolved_by | security_result.detection_fields.app_resolved_by | Value from the app_resolved_byfield. | 
| app_risk | security_result.detection_fields.Application Risk,application_risk | Value from the app_riskfield. | 
| app_technology | application_technology | Value from the app_technologyfield. | 
| application | principal.application | Value from the applicationfield. | 
| application_category | security_result.detection_fields.Application Category | Value from the application_categoryfield. | 
| application_risk | security_result.detection_fields.Application Risk | Value from the application_riskfield. | 
| application_technology | security_result.detection_fields.Application Technology | Value from the application_technologyfield. | 
| bytes_received | network.received_bytes | Value from the bytes_receivedfield. | 
| bytes_sent | network.sent_bytes | Value from the bytes_sentfield. | 
| category | application_category | Value from the categoryfield. | 
| category_type | security_result.detection_fields.category_type | Value from the category_typefield. | 
| client_host_name | network.dhcp.client_hostname | Value from the client_host_namefield. | 
| client_physical_address | network.dhcp.chaddr | Value from the client_physical_addressfield. | 
| con_event | security_result.detection_fields.con_event | Value from the con_eventfield. | 
| con_id | security_result.detection_fields.con_id | Value from the con_idfield. | 
| connevent | security_result.detection_fields.connevent | Value from the conneventfield. | 
| connid | security_result.detection_fields.connid | Value from the connidfield. | 
| date | event.timestamp | Parsed from the dateandtimefields, adjusted for timezone. | 
| device_id | intermediary.asset.asset_id | Value from the device_idfield, prefixed withID:. | 
| device_model | intermediary.hostname | Value from the device_modelfield. | 
| device_name | intermediary.hostname | Value from the device_namefield. | 
| device_serial_id | intermediary.asset.asset_id | Value from the device_serial_idfield, prefixed withID:. | 
| domain | principal.administrative_domain,target.hostname | Value from the domainfield. | 
| dst_country | target.location.country_or_region | Value from the dst_countryfield. | 
| dst_country_code | target.location.country_or_region | Value from the dst_country_codefield. | 
| dst_ip | target.ip | Value from the dst_ipfield. | 
| dst_mac | target.mac | Value from the dst_macfield. | 
| dst_port | target.port | Value from the dst_portfield. | 
| dst_trans_ip | target.nat_ip | Value from the dst_trans_ipfield. | 
| dst_trans_port | target.nat_port | Value from the dst_trans_portfield. | 
| dst_zone | security_result.detection_fields.dst_zone | Value from the dst_zonefield. | 
| dstzone | security_result.detection_fields.dstzone | Value from the dstzonefield. | 
| dstzonetype | security_result.detection_fields.dstzonetype | Value from the dstzonetypefield. | 
| duration | network.session_duration.seconds | Value from the durationfield. | 
| ether_type | security_result.detection_fields.ether_type | Value from the ether_typefield. | 
| exceptions | security_result.detection_fields.exceptions | Value from the exceptionsfield. | 
| fw_rule_id | security_result.rule_id | Value from the fw_rule_idfield. | 
| fw_rule_name | security_result.rule_name | Value from the fw_rule_namefield. | 
| fw_rule_section | security_result.rule_set | Value from the fw_rule_sectionfield. | 
| fw_rule_type | security_result.rule_type | Value from the fw_rule_typefield. | 
| gw_id_request | security_result.detection_fields.gw_id_request | Value from the gw_id_requestfield. | 
| gw_name_request | security_result.detection_fields.gw_name_request | Value from the gw_name_requestfield. | 
| hb_health | security_result.detection_fields.hb_health | Value from the hb_healthfield. | 
| hb_status | security_result.detection_fields.hb_status | Value from the hb_statusfield. | 
| http_category | security_result.detection_fields.http_category | Value from the http_categoryfield. | 
| http_category_type | security_result.detection_fields.http_category_type | Value from the http_category_typefield. | 
| http_status | network.http.response_code | Value from the http_statusfield. | 
| in_display_interface | security_result.detection_fields.in_display_interface | Value from the in_display_interfacefield. | 
| in_interface | security_result.detection_fields.in_interface | Value from the in_interfacefield. | 
| ipaddress | principal.ip,network.dhcp.ciaddr | Value from the ipaddressfield. | 
| log_component | metadata.product_event_type,security_result.detection_fields.log_component | Value from the log_componentfield. | 
| log_id | metadata.product_log_id | Value from the log_idfield. | 
| log_msg | metadata.description | Value from the messagefield after removingmessage=. | 
| log_occurrence | security_result.detection_fields.log_occurrence | Value from the log_occurrencefield. | 
| log_subtype | security_result.detection_fields.log_subtype,security_result.action | Value from the log_subtypefield. | 
| log_type | security_result.detection_fields.log_type | Value from the log_typefield. | 
| log_version | security_result.detection_fields.log_version | Value from the log_versionfield. | 
| message | metadata.description | Value from the messagefield. | 
| nat_rule_id | security_result.detection_fields.nat_rule_id | Value from the nat_rule_idfield. | 
| nat_rule_name | security_result.detection_fields.nat_rule_name | Value from the nat_rule_namefield. | 
| out_display_interface | security_result.detection_fields.out_display_interface | Value from the out_display_interfacefield. | 
| out_interface | security_result.detection_fields.out_interface | Value from the out_interfacefield. | 
| packets_received | network.received_packets | Value from the packets_receivedfield. | 
| packets_sent | network.sent_packets | Value from the packets_sentfield. | 
| priority | security_result.severity | Mapped from the priorityorseverityfield based on a lookup table. | 
| protocol | network.ip_protocol | Parsed from the protocolfield using a lookup table. | 
| reason | security_result.detection_fields.reason,security_result.summary | Value from the reasonfield. | 
| recv_bytes | network.received_bytes | Value from the recv_bytesfield. | 
| recv_pkts | network.received_packets | Value from the recv_pktsfield. | 
| referer | network.http.referral_url | Value from the refererfield. | 
| rule_id | security_result.rule_id | Value from the rule_idfield. | 
| rule_name | security_result.rule_name | Value from the rule_namefield. | 
| sent_bytes | network.sent_bytes | Value from the sent_bytesfield. | 
| sent_pkts | network.sent_packets | Value from the sent_pktsfield. | 
| severity | priority | Value from the severityfield. | 
| src_country | principal.location.country_or_region | Value from the src_countryfield. | 
| src_country_code | principal.location.country_or_region | Value from the src_country_codefield. | 
| src_ip | principal.ip | Value from the src_ipfield. | 
| src_mac | principal.mac | Value from the src_macfield. | 
| src_port | principal.port | Value from the src_portfield. | 
| src_trans_ip | principal.nat_ip | Value from the src_trans_ipfield. | 
| src_trans_port | principal.nat_port | Value from the src_trans_portfield. | 
| src_zone | security_result.detection_fields.src_zone | Value from the src_zonefield. | 
| srczone | security_result.detection_fields.srczone | Value from the srczonefield. | 
| srczonetype | security_result.detection_fields.srczonetype | Value from the srczonetypefield. | 
| status | security_result.action_details,security_result.action | Value from the statusfield. | 
| status_code | network.http.response_code | Value from the status_codefield. | 
| target.url | target.url | Value from the urlfield. | 
| time | event.timestamp | Parsed from the dateandtimefields, adjusted for timezone. | 
| timestamp | event.timestamp | Parsed from the timestampfield. | 
| tran_dst_ip | target.nat_ip | Value from the tran_dst_ipfield. | 
| tran_dst_port | target.nat_port | Value from the tran_dst_portfield. | 
| tran_src_ip | principal.nat_ip | Value from the tran_src_ipfield. | 
| tran_src_port | principal.nat_port | Value from the tran_src_portfield. | 
| url | target.url | Value from the urlfield. | 
| used_quota | security_result.detection_fields.used_quota | Value from the used_quotafield. | 
| user_agent | network.http.user_agent,network.http.parsed_user_agent | Value from the user_agentfield. Parsed version also generated. | 
| user_gp | extensions.auth.type | If user_gpisvpn, setsextensions.auth.typetoVPN. | 
| user_name | principal.user.userid,principal.user.email_addresses | Value from the user_namefield. If it contains@, also added toemail_addresses. | 
| web_policy_id | security_result.detection_fields.web_policy_id | Value from the web_policy_idfield. | 
| N/A | event.idm.read_only_udm.metadata.event_timestamp | Copied from event.timestamp. | 
| N/A | event.idm.read_only_udm.metadata.log_type | The Chronicle ingestion schema specifies the log type as SOPHOS_FIREWALL. | 
| N/A | event.idm.read_only_udm.metadata.vendor_name | Constant value SOPHOS. | 
| N/A | event.idm.read_only_udm.metadata.product_name | Constant value SOPHOS Firewall. | 
| N/A | event.idm.read_only_udm.network.application_protocol | Set to DHCPifipaddressfield is present. Otherwise, derived from theprotocolfield. | 
| N/A | event.idm.read_only_udm.metadata.event_type | Determined by logic based on the presence of other fields (e.g., NETWORK_HTTP,NETWORK_CONNECTION,NETWORK_DHCP,STATUS_UPDATE,GENERIC_EVENT). | 
| N/A | event.idm.read_only_udm.security_result.action | Derived from the statusorlog_subtypefields. | 
Need more help? Get answers from Community members and Google SecOps professionals.