RHEL7: Configure a system to accept logging from a remote system.

Share this link

Configuration Procedure

Edit the /etc/rsyslog.conf file and uncomment the following lines to allow TCP syslog receipt:

#$ModLoad imtcp
#$InputTCPServerRun 514

Check the file syntax:

# rsyslogd -N 1

Restart the rsyslog service:

# systemctl restart rsyslog

Add a new rule to the firewall configuration:

# firewall-cmd --permanent --add-port=514/tcp
success

Alternatively, create the /etc/firewalld/services/rsyslog.xml (templates are available in the /usr/lib/firewalld/services directory) and paste the following lines:

<?xml version="1.0" encoding="utf-8"?>
<service>
<short>Rsyslog</short>
<description>Rsyslog</description>
<port protocol="tcp" port="514"/>
</service>

Add a new service to the firewall:

# firewall-cmd --permanent --add-service=rsyslog
success

In any case, reload the firewall configuration:

# firewall-cmd --reload
success

Additional Resources

The Tecmint website provides a tutorial on How to Create a Centralized Log Server with Rsyslog in CentOS/RHEL 7.

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading...

Leave a Reply

Upcoming Events (Local Time)

There are no events.

RHCSA7: Task of the day

Allowed time: 5 minutes.
Create a new user account called "bob" with password "redhat" and set expiration in one week.

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a caching-only DNS server.

Follow me on Twitter

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...