Robert Watson, FreeBSD Project
To configure a portmaster 25 to act as a serial console server for FreeBSD, you can use something like the following: set sysname portmaster.foo.bar set ether0 address 192.168.3.200 set ether0 netmask 255.255.255.0 set ether0 broadcast 192.168.3.255 set s9 service_device telnet 2009 set s9 device set s9 hangup off reset s9 save all |
This connects TCP port 2009 using the Telnet protocol to whatever is on serial port S9 (typically, a FreeBSD serial console). Add any additional port configurations by repeating the s9 block, substituting additional port names and TCP port numbers.
NOTE: With some Intel motherboards, I've seen a problem wherein the RTS/CTS pins on the serial port fluctuate rapidly, triggering excessive interrupt detection in the portmaster. On these ports, I've found it necessary to disable RTS/CTS flow control. This can be done using "set s9 RT off". The symptom is that whenever the serial port starts generating significant quantities of sequential output, the serial port will be reset by the portmaster, which is easier to diagnosis if the debuggering output is turned on.
Remember not to reconfigure s0 if you're using that as the console for the portmaster.
Much modern server hardware provides BIOS-based console redirection during the boot process. Typically this support ceases to function once the operating system really gets going, so it must be supplemented by OS redirection. FreeBSD supports redirection in various loader stages, for the low-level kernel console output, single-user mode, and for multi-user login.
To configure serial redirection during the main boot loader, add the following to /boot/loader.conf:
console="comconsole"
This will also cause the low-level kernel console to be directed to the serial port, which also results in kernel messages and single-user mode access on the serial port. To configure a login session for multi-user mode, enable the ttyd0 entry in /etc/ttys:
ttyd0 "/usr/libexec/getty std.9600" dialup on secure
Note that the "off" entry in the default ttys has been changed to "on"; the "secure" flag allows root login on the port. You can leave the ttyv0 entry enabled, permitting login on the normal console also. The vidcontrol(8) tool can be used to tweak the console settings, such as causing some output to be redirected to multiple consoles.
If you need to send a serial break, use the telnet client's "send break" functionality, which can drop the FreeBSD box into a debugger (if configured into the FreeBSD kernel).
You may also be interested in the pin-out information for the Livingston Portmaster 25 using the DC-MRJ45-c 68-pin cable.
portmasters.com not only sells affordable refurbished portmaster 25's with all the necessary cabling, but they also have the documentation online.
The above configuration redirects the system console to a TCP port reached using telnet. This means that the boot process can be monitored and managed using access to the port, as well as access to single usermode, a login prompt, etc. Any passwords sent over the TCP connection will also be sent in the clear. As such, you want to put the ethernet port of a portmaster configured in this manner only on a trusted network segment; any access by undesired parties could result in sniffing of passwords (such as the root password), or the ability to control most elements of the FreeBSD box. These assumptions are often valid and sufficient for controlled access ISP management networks. More modern remote console systems permit providing strong authentication and session encryption/protection to avoid this issue.