The question came up today so wanted to post it here for future reference.
First if you use autorun you need to change it in the appropriate autorun file:
i.e. the majority of MUD's will have to edit the autorun file line 37.
autorun:37:PORT=4000
autorun.cmd:21:PORT=4000
autorun.pl:25:$port = 4000;
autorun.sh:36:PORT=4000
Then go to the src folder and change config.c:
config.c:199:ush_int DFLT_PORT = 4000;
make and then reboot the game and connect.
Comments
More information
More information can be found in admin.txt
Here is a relevant excerpt:
"-p Port Selection. Allows you to choose on which port the game is to listen
for connections. The default port is 4000, which is historically the port used
by most DikuMuds. You can change the default in CEDIT and the PORT= line of the
autorun script. (The PORT= line of config.c is ignored if it is set in CEDIT.)
The port specified on the command line or by the autorun script will take
precedence over the port specified in CEDIT or config.c. "