January 17, 2021

Fedora 32 -- running rdate

Rdate is an ancient protocol, part of the original internet. It runs on port 37 on either UDP, TCP, or both.

A client makes a connection and the server returns 4 bytes, the number of seconds since 00:00 (midnight) 1 January, 1900 GMT. This is an unsigned 32 bit integer in network byte order (big endian). After returning these 4 bytes, the server closes the connection (for TCP).

This value will overflow (roll over) on 7 February 2036.

Get this going on Fedora

Few people will want to run this, but I need to to support some ancient software that I don't want to rebuild or redesign.
su
dnf -y install xinetd
Then edit /etc/xinetd.d/time-stream and find the line that says "disable = yes" and change it to no. Be careful with this, the double thing on not disabling often causes me to set this improperly. Calling thing "enable" would be better design.
systemctl start xinetd.service
systemctl enable xinetd.service
firewall-cmd --add-port=37/tcp --permanent
firewall-cmd --reload
You can test this using "telnet localhost 37", but just be aware that the 32 bit binary response will print as non-ascii hieroglyphics.
Also, the following is useful:
firewall-cmd --list-all
systemctl status xinetd.service


Have any comments? Questions? Drop me a line!

Adventures in Computing / tom@mmto.org