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:

  1. 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
  2. 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
  3. 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;  
            } 
faq/manage/ports.txt · Last modified: 2008/09/24 00:05 by ds531