Enable ports 80 (HTTP) and 443 (HTTPS) (2024)

By default, PaperCut NG/MF listens to ports 9191, and 9192, 9195 HTTP and HTTPS communication respectively. These ports have been selected as they’re generally unused by other applications. Because PaperCut NG/MF is a web application, you might want to have the interface available on the standard HTTP and HTTPS ports (80 and 443 respectively). One reason for doing so is to simplify URLs communicated verbally (as the user does not need to supply a port number).

The configuration procedure is different for each operating system. See below for instructions. Important: Before you begin, ensure no other applications (such as IIS, or Apache) are currently installed and using ports 80 or 443 on the server hosting PaperCut NG/MF.

Windows

  1. Open the file: [app-path]\server\server.properties

  2. Enable port 80 (and 443) by changing the appropriate settings from N to a Y. They should look like: server.enable-http-on-port-80=Y
    server.enable-https-on-port-443=Y

  3. Change the server port in all providers installed on your network. The server port is set in the print-provider.conf file in the provider directory.

  4. Change the server port in the User Client config file:

    [app-path]\client\config.properties.

  1. Restart the Application Server. (See Stop and start the Application Server.)

  2. Test and ensure the web interface is working, for example,http://[myserver]/admin

Linux

On Linux systems, only privileged programs that run as root can use ports under 1024. In line with security best practice, PaperCut runs as a non-privileged user. To enable port 80 and 443, use iptables (or ipchains on old systems) to port-forward 80 to 9191 (HTTP) 9192/9195 (HTTPS).

The following commands provide an example. Consult your distribution’s documentation to see how to persist the iptables rules between system restarts:

/sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip> \
-p tcp --dport 80 -j REDIRECT --to-ports 9191
/sbin/iptables -t nat -I PREROUTING --src 0/0 --dst <server_ip> \
-p tcp --dport 443 -j REDIRECT --to-ports 9192

These commands would typically be placed in an rc init script or the iptables startup config script as provided by your distribution.

When you are done, restart the Application Server. (See Stop and start the Application Server.)

Mac

The approach on Mac systems is similar to Linux. With the release of Mac OS X 10.11 (El Capitan) and the inclusion of System Integrity Protection (SIP) modifications to /System/ are disabled by default and disabling this feature is not recommended. The following information works for Mac OS X 10.10. For Mac OS X 10.10 and later, the support for the IPFW firewall has been removed in favor of PF.

Mac OS X 10.10

From Mac OS X 10.10, you must use the pfctl command to modify the Mac firewall.

  1. Create the anchor file:
    sudo vi /etc/pf.anchors/com.papercut

  2. Modify the /etc/pf.anchors/com.papercut file by adding the following lines:

    rdr pass on lo0 inet proto tcp from any to self port 80 -> 127.0.0.1 port 9191
    rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9191
    rdr pass on en1 inet proto tcp from any to any port 80 -> 127.0.0.1 port 9191

  3. Test the anchor file:
    sudo pfctl -vnf /etc/pf.anchors/com.papercut

  4. Add the anchor file to the pf.conf file:
    sudo vi /etc/pf.conf

    Then add in the following lines under each corresponding section, for example, the rdr-anchor line under the current rdr-anchor line, and the load anchor under the current load-anchor statement:
    rdr-anchor "port80"
    load anchor "port80" from "/etc/pf.anchors/com.papercut"

  5. Load the pf.conf file automatically at startup by editing the current daemon for pf:
    sudo vi /System/Library/LaunchDaemons/com.apple.pfctl.plist

    Then within the section detailing the program arguments <key>ProgramArguments</key>, add in an extra string with -e, which enables the config, as per:

    <string>pfctl</string>
    <string>-e</string>
    <string>-f</string>
    <string>/etc/pf.conf</string>

  6. Save the file, exit and restart the server to test.

  7. To test this method manually (no restart required) you can use the pfctl command:
    sudo pfctl -ef /etc/pf.conf

    This loads and enables the pf.conf file, which then calls the com.papercut anchor file.

  8. Restart the Application Server. (See Stop and start the Application Server.)

Mac OS X 10.9 and earlier

In Mac OS X 10.9 and earlier, use the ipfw command to modify the Mac firewall:

sudo /sbin/ipfw add 102 fwd 127.0.0.1,9191 tcp from any to any 80 in

See the ipfw man page for all the scary details.

Enable ports 80 (HTTP) and 443 (HTTPS) (2024)

FAQs

How do I enable ports 80 and 443? ›

To enable port 80 and 443, use iptables (or ipchains on old systems) to port-forward 80 to 9191 (HTTP) 9192/9195 (HTTPS). These commands would typically be placed in an rc init script or the iptables startup config script as provided by your distribution. When you are done, restart the Application Server.

Is it safe to have port 443 and 80 open? ›

Summary. Opening port 80 on your firewall is no different than opening port 443, provided the web server is configured to redirect the traffic to a secure port. This also ensures users connecting on port 80 do not get connection errors.

What is HTTPS 443 vs HTTP 80? ›

Port 443 is encrypted, but port 80 is not, which is a crucial difference between the two. Port 80 is, by default, unencrypted to access internet pages, as HTTP is an insecure form of communication. Port 443 is secure because it uses HTTPS, a secure variant of port 80, to achieve the same objectives.

Can you run HTTPS on port 80? ›

A solid grasp of data transmission is essential if you plan to take the Network+ exam in the future. By far, the two most common transmission protocols are HTTP and HTTPS, which run on ports 80 and 443, respectively.

How do I enable port 80 for HTTP? ›

How do you open port 80?
  1. Enter your router's IP address into your browser bar. Log in when prompted.
  2. Navigate to the "Port Forwarding" section and fill out the forwarding form.
  3. Check "Enabled" or "On" next to Port 80. Then, save your settings.
Mar 19, 2024

How do you check if ports 80 and 443 are open? ›

  1. Port 443 is for secure http, Port 80 is normal unsecured http.
  2. So Port 443 is not an open Port 80.
  3. However if you asking how to check for either Port, the best way is a Port scanner. ...
  4. All will require a host name or IP to scan, and most should allow you to specify which port(s) you want to check.
Jan 24, 2021

How do I make sure port 80 is open? ›

Open port 80
  1. From the Start menu, select Control Panel, select System and Security, and then choose Windows Firewall. ...
  2. Select Advanced Settings.
  3. Select Inbound Rules.
  4. Select New Rule in the Actions window.
  5. Choose the Port rule type.
  6. Select Next.
  7. On the Protocol and Ports page, choose TCP.
Feb 2, 2024

How to tell if port 443 is blocked? ›

Enter "nc -zv + IP address or hostname + port number" (e.g., nc -zv www.synology.com 443 or nc -zv 10.17. xxx. xxx 5000) to run the telnet command and test the port status. If the port is open, a message will say Connection to www.synology.com port 443 [udp/https] succeeded!

How to know if port 80 is open? ›

Perform the following steps to check whether the port is listened on:
  1. Open the Command Prompt window.
  2. Run the following command: netstat -ano | findstr :80. If TCP 0.0. 0.0:80 0.0. 0.0:0 LISTENING 4 is displayed, all traffic from port 80 is listened on. Otherwise, you must modify the listen address.
May 9, 2022

Should I use port 80 or 443? ›

Port 443 is encrypted, but port 80 is not, which is a crucial difference between the two. Port 80 is, by default, unencrypted to access internet pages, as HTTP is an insecure form of communication. Port 443 is secure because it uses HTTPS, a secure variant of port 80, to achieve the same objectives.

Do I need to open port 443 for HTTPS? ›

In a world where secure internet use is no longer a luxury but a necessity, understanding the role of Port 443 is essential. This port, crucial for online security, is the gateway for HTTPS traffic, ensuring that your private information remains just that — private.

What is port 80 and 443 used for? ›

Port 80 is used for http (unsecured web traffic). Port 443 is used for https (secured web traffic).

Can HTTP and HTTPS be on the same port? ›

It's possible to serve both HTTP and HTTPS on the same port. A TLS handshake record starts with byte 22, so you can use that to determine which protocol the client is trying to speak.

What are the vulnerabilities of port 80 and 443? ›

HTTP and HTTPS (Ports 80, 443, 8080, and 8443): These hotly-targeted ports are used for HTTP and HTTPS protocols and are vulnerable to attacks such as cross-site scripting, SQL injections, cross-site request forgeries, and DDoS attacks.

Why is HTTP always port 80? ›

Port 80 was introduced by Tim Berners-Lee in 1991 in the HTTP 0.9 document. The document states that if there is no port assigned for HTTP connection, Port 80 is used by default. It connects you to the worldwide web (WWW). A user, with the help of this port, can connect to webpages available on the internet.

How do I make sure port 443 is open? ›

To enable Port 443 on Windows, you need to add it to Firewall. Here's how to allow port 443 in Windows Firewall: Open the Firewall Control Panel by accessing “Start” > “Run”. On the left pane, select “Advanced Settings”, then click on “Inbound Rules” in the top-left corner.

How do I allow TCP port 443 traffic? ›

Select “TCP” > “Specific local ports,” and type in “443” next to it. In the “Action” window, select “Allow the connection” and click “Next.” In the “Profile” window, choose “Domain” > “Private,” and click “Next.” In the “Name” window, type in “WCF-WF 4.0 Samples” and click “Finish.”

How do I enable port connection? ›

How to open a port on the firewall
  1. Click on Start then on Control Panel.
  2. Click on Windows Firewall and then click on Advanced Settings.
  3. Right click on Inbound Rules then on New Rule:
  4. Select Port and click on Next:
  5. Enter a specific local port (e.g. 8080) and click on Next:
  6. Click on Next:
  7. Name the rule and click on Finish:
Jun 16, 2023

Why is my server not LISTening on port 443? ›

This could be due to Nginx not listening on port 443, the VM's firewall blocking the port, or a misconfiguration in your VPC network.

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 6146

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.