# Enable Syslog on Port 514 and Allow via Firewall (Ubuntu)

##### <span style="color: rgb(53, 152, 219);">**Step 1: Install rsyslog**</span>  
<span style="color: rgb(0, 0, 0);">1. Open terminal.</span>  
<span style="color: rgb(0, 0, 0);">2. Run the following commands:</span>

```javascript
sudo apt update
sudo apt install rsyslog -y
sudo systemctl enable rsyslog
sudo systemctl start rsyslog
```

##### <span style="color: rgb(53, 152, 219);">**Step 2: Enable Syslog Reception on Port 514**</span>  
<span style="color: rgb(0, 0, 0);">1.Open the rsyslog configuration file:</span>

```javascript
sudo nano /etc/rsyslog.conf
```

##### <span style="color: rgb(0, 0, 0);">2. Find and uncomment or add these lines:</span>

```javascript
module(load="imudp")
input(type="imudp" port="514")
module(load="imtcp")
input(type="imtcp" port="514")
```

##### <span style="color: rgb(0, 0, 0);">3.Save and exit (Ctrl+X, then Y, then Enter).</span>

##### <span style="color: rgb(53, 152, 219);">**Step 3: Restart rsyslog**</span>

```javascript
sudo systemctl restart rsyslog
```

##### <span style="color: rgb(53, 152, 219);">**Step 4: Allow Port 514 in UFW Firewall**</span>  
<span style="color: rgb(0, 0, 0);">1. Run the following:</span>

```javascript
sudo ufw allow 514/udp
sudo ufw allow 514/tcp
sudo ufw reload
```

##### <span style="color: rgb(0, 0, 0);">2. Check status:</span>

```javascript
sudo ufw status
```

##### <span style="color: rgb(53, 152, 219);">**Step 5: Confirm Port is Listening**</span>

```javascript
sudo ss -tulnp | grep 514
```

##### <span style="color: rgb(0, 0, 0);">Or if netstat is available:</span>

```javascript
sudo netstat -tulnp | grep 514
```

##### <span style="color: rgb(53, 152, 219);">**Step 6: Optional - Test from Remote Client**</span>  
<span style="color: rgb(0, 0, 0);">From another machine:</span>

```java
logger -n <server-ip-address> -P 514 "Test syslog message"
```

##### <span style="color: rgb(0, 0, 0);">Then on the Ubuntu server:</span>

```javascript
sudo tail -f /var/log/syslog
```

##### <span style="color: rgb(53, 152, 219);">**Step 7: End-to-End Connectivity Test (Ping)**</span>  
<span style="color: rgb(0, 0, 0);">From Azure VM (log collector), test connectivity to Cisco Meraki and Palo Alto devices.</span>

##### <span style="color: rgb(0, 0, 0);">**Ping Cisco Meraki:**</span>

```javascript
ping <meraki_ip_address>
```

##### **<span style="color: rgb(0, 0, 0);">Ping Palo Alto:</span>**

```javascript
ping <palo_alto_ip_address>
```

##### <span style="color: rgb(224, 62, 45);">**If ping is successful, you'll see replies with time. If not, verify:**</span>

- ##### <span style="color: rgb(0, 0, 0);">NSG and UFW rules in Azure</span>
- ##### <span style="color: rgb(0, 0, 0);">On-prem firewall rules</span>
- ##### <span style="color: rgb(0, 0, 0);">IP reachability and routing</span>

*<span class="TextRun SCXW71272603 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXW71272603 BCX0">If you need further </span><span class="NormalTextRun SCXW71272603 BCX0">assistance</span><span class="NormalTextRun SCXW71272603 BCX0">, kindly contact our support at </span></span><span style="color: rgb(53, 152, 219);">**<span class="TextRun SCXW71272603 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXW71272603 BCX0">support@cytechint.com</span></span>**</span><span class="TextRun SCXW71272603 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXW71272603 BCX0"> for prompt </span><span class="NormalTextRun SCXW71272603 BCX0">assistance</span><span class="NormalTextRun SCXW71272603 BCX0"> and guidance.</span></span><span class="EOP SCXW71272603 BCX0" data-ccp-props="{}"></span>*