How do I change the http and https ports IPCOP uses?
You have several options to change the ports IPCOP uses:
- IPCOP command line change program
- Use GuiListenPorts addon (after installing Addon Server)
- Run /usr/local/bin/setreservedports [PortToUse]
- Edit files manually
If you chose to edit the files manually, use the following steps:
- Edit Apache configuration files
- Connect to IPCOP via SSH using port 222
(on Windows connect using Putty [see Running Commands on IPCOP Tutorial]) - Run
cd /etc/httpd/conf vi httpd.conf - Find and replace all instances of 445 (only two entries to change) with the port number you wish to use
- save and close httpd.conf
- restart apache
killall httpd httpd -DSSL
- Change the port forwarding reserves
- Edit ’/home/httpd/cgi-bin/portfw.cgi’
- Find line that looks like this:
my @tcp_reserved = (81,222,445);
change the 445 to the same port you changed above
- Save the changes
- Edit IPCOP header file
- Edit ’/var/ipcop/header.pl’
- Change the following to reflect your new port
### Make sure this is an SSL request
if ($ENV{’SERVER_ADDR’} && $ENV{’HTTPS’} ne ’on’) {
print "Status: 302 Moved\r\n";
print "Location: https:#$ENV{’SERVER_ADDR’}:445/$ENV{’PATH_INFO’}\r\n\r\n";
exit 0;
}
