Opening Port 8080 on MacBook Pro Tahoe26.4

Hi all. Have an app (program) that needs to run through port 8080 to communicate with a remote server. It runs through an SSH program called Putty on Windows and Linux. I am attempting to use Terminus on this Mac. I can get part of it working and can achieve a remote connection to the backend part of the program. It runs well on all of our Windows and Linux PCs so I am know by that the port is open and working on our routers and modem. The problem I am running into is that it can't get out via port 8080 on this Mac. I have spent several days going through forums and post trying to find out how to access the ports on the Mac currently running Tahoe 26.4. I have gone to System Setting/Network/Firewall and allowed Terminus incoming permissions. If I am understanding other information correctly, the Mac is not allowing port 8080 to be listened for. Is there some way to modify ports on a Mac with Tahoe 26.4 and if so how can I get to them? Thanks in advance for your help.

MacBook Pro 16″, macOS 26.4

Posted on Apr 7, 2026 8:51 AM

Reply
Question marked as Top-ranking reply

Posted on Apr 7, 2026 12:59 PM

Sounds like you want ssh tunneling:


ssh -L 8080:localhost:80 remote.host.address


The above assumes that you need to access port 8080 on your local Mac, and it needs to be pointed at the remote port 80, which is the typical web server port.


If you really need to connect with remote port 8080, then


ssh -L 8080:localhost:8080 remote.host.address


You would access the local port 8080 using


localhost:8080


and that will be directed to the local side of the ssh tunnel, which will be sent to the remote system and the 2nd port number specified in the -L option.


Actually the local side port number can be just about any high numbered port number you like. The only important port number is the remote port number.


Also you can use Applications -> Utilities -> Terminal. You do not need Terminus, or PuTTY, or any other terminal emulator. macOS provides a very good terminal emulator in Applications -> Utilities -> Terminal. If you want to use Terminus, that is fine, but it is also not essential to making ssh connections.


Note, ssh, scp & sftp are included with every macOS installation. No need for any extra installs to do ssh connections.


If you need to memorize this ssh connection, you can create an Applications -> Utilities -> Terminal -> Settings -> Profiles -> [+] profile and specify the ssh command to be run in the Terminal -> Settings -> Profiles -> name-of-your-profile -> Shell -> "Run command:" field. Then just Terminal -> Shell (menu) -> New Window (or New Tab) -> name-of-your-profile. You can have as many profiles (aka bookmarks) as you desire this way.

25 replies
Question marked as Top-ranking reply

Apr 7, 2026 12:59 PM in response to tabbyfromcanton

Sounds like you want ssh tunneling:


ssh -L 8080:localhost:80 remote.host.address


The above assumes that you need to access port 8080 on your local Mac, and it needs to be pointed at the remote port 80, which is the typical web server port.


If you really need to connect with remote port 8080, then


ssh -L 8080:localhost:8080 remote.host.address


You would access the local port 8080 using


localhost:8080


and that will be directed to the local side of the ssh tunnel, which will be sent to the remote system and the 2nd port number specified in the -L option.


Actually the local side port number can be just about any high numbered port number you like. The only important port number is the remote port number.


Also you can use Applications -> Utilities -> Terminal. You do not need Terminus, or PuTTY, or any other terminal emulator. macOS provides a very good terminal emulator in Applications -> Utilities -> Terminal. If you want to use Terminus, that is fine, but it is also not essential to making ssh connections.


Note, ssh, scp & sftp are included with every macOS installation. No need for any extra installs to do ssh connections.


If you need to memorize this ssh connection, you can create an Applications -> Utilities -> Terminal -> Settings -> Profiles -> [+] profile and specify the ssh command to be run in the Terminal -> Settings -> Profiles -> name-of-your-profile -> Shell -> "Run command:" field. Then just Terminal -> Shell (menu) -> New Window (or New Tab) -> name-of-your-profile. You can have as many profiles (aka bookmarks) as you desire this way.

Apr 7, 2026 12:52 PM in response to tabbyfromcanton

> Etresoft, Snark much?


Calm down a little. Etresoft is only trying to help.


in the VAST (>99.99%) of cases, users have no need to open incoming ports on their systems, and those that do usually understand why and how.


Given how little detail there was in your original post, it isn't clear what you were trying to do, and they're only trying to clarify that you know what you're asking for.


It sounds as though you're trying to setup a ssh tunnel from your Mac to the remote server, so that you can then connect to port 8080 on your machine and have that connection tunneled over to the server. For reference, this is a poorly-regarded security method that is usually better handled via a VPN connection, but that may be outside of your purview.


That said, without knowing what command you're executing, and what error messages (if any) you get, it's really hard to debug this kind of thing.


For example, I'm guessing you're using SSH -L to setup Local port forwarding. If there's a problem doing this you'll probably get an error message such as:


channel_setup_fwd_listener_tcpip: cannot listen to port: 8080


or:


Could not request local forwarding.


Do you get one? both? of these?


This indicates a failure in setting up the listening port. If you don't get that message then it indicates the local port was fine, so now we can move up the stack and look at whether it's a firewall problem (likely not if you're using localhost), or a remote server problem (probably not since it's working for other clients), or maybe it's a problem with the format of the command itself (which we can't see, of course).


Assuming the ssh executes without an error, the next step would be to see what ports are LISTENing on your system. There are a couple of ways of doing this. In a separate Terminus/Terminal window, run either:


netstat -an | grep LISTEN


or


lsof -i -P | grep LISTEN


both of these should tell you what ports are listening on your system (the lsof version will also identify the app that's listening there). So you can check if port 8080 is open.


So, in summary, what you're asking for is not common, but it's certainly something that should be possible, do more details are required to troubleshoot why it isn't working.

Apr 11, 2026 7:03 AM in response to tabbyfromcanton

In any ssh networking situation there are at least 2 sides (maybe 3 if you have a Jump Host or Bastion system in the middle).


What ports on the remote system do you need to access? This is where you set up a -L tunnel.


Does the remote system need to access any ports on the Mac? This would be a situation where you use a -R reverse tunnel.


The first port number in the -L tunnel option is the entrance to the tunnel for the local system that wants to connect (I am assuming this is your Mac).


The second port in the -L tunnel option is the port with the service on the remote system that your Mac needs to talk to.


to make a connection the Mac specifies “localhost” as the address. For example, if the tunnel connects with a web server (or service that talks to a web browser), then from a browser on the Mac, you specify


http://localhost:34567


Where 34567 in this example is whatever you specified as the first port number in the -L tunnel option. Th browser will connect to the tunnel entrance on the Mac side of the tunnel. ssh will carry the connection to the remote system and make a connection to the second port number in the -L tunnel option.


If the remote system needs to connect with a service hosted on your Mac, then you use a -R reverse tunnel. In this case the first port number is the entrance to the reverse tunnel on the remote system, and the second port number is the port of the service on your Mac. The remote system will also use “localhost” as the connection address so it can access the reverse tunnel port entrance local to the remote system.


It gets more complicated if you need to have the Mac pass a remote connection from the remote system to a device on your Mac’s local network. It can be done, but requires a different reverse tunnel specification


ssh -R remote-port-entrance:address-of-device-on-the-Mac’s-LAN:port-number-the-LAN-device-is-listing-to remote.system.address 


So, what are the port numbers for the services on the system that is running the service? And be clear about which system that is, and the service being provided.

Apr 10, 2026 1:08 PM in response to tabbyfromcanton

tabbyfromcanton wrote:

Thanks Barney-15E. Forgive my ignorance with this reply. The port I am using for the first connection is 1156 and it allows the connection to work. This allows the remote connection to complete and is the first step needed to allow a more robust graphical connection which happens in a browser enviroment. Allowing port 80 or 8080 to be open or listened for is how the web based or "graphical" is used. Let me know what other info or screen shots I can post that may help

macOS “opens” ports when you have something listening on that port. You must be running something g that sets up the listening socket on 8080. macOS doesn’t listen for anything itself. You must be running some program that tells macOS it is expecting communications on that port.

Apr 10, 2026 1:26 PM in response to tabbyfromcanton

> The basic starting point for my connection is 162.222.127.156 port 1159


That isn't what's happening here.


You're running the command:


> ssh -L 8080:localhost:80 162.222.127.156


Nowhere in that command is SSH told to connect to port 1159 on the server (unless you've gone far out of your way to reconfigure SSH's defaults, which is unusual/unlikely).


You need to add the -p switch to your ssh command to tell it to use a non-standard port:


ssh -L 8080:localhost:80 -p 1159 162.222.127.156



Apr 7, 2026 9:36 AM in response to tabbyfromcanton

tabbyfromcanton wrote:

Hi all. Have an app (program) that needs to run through port 8080 to communicate with a remote server. It runs through an SSH program called Putty on Windows and Linux. I am attempting to use Terminus on this Mac. I can get part of it working and can achieve a remote connection to the backend part of the program. It runs well on all of our Windows and Linux PCs so I am know by that the port is open and working on our routers and modem. The problem I am running into is that it can't get out via port 8080 on this Mac. I have spent several days going through forums and post trying to find out how to access the ports on the Mac currently running Tahoe 26.4. I have gone to System Setting/Network/Firewall and allowed Terminus incoming permissions. If I am understanding other information correctly, the Mac is not allowing port 8080 to be listened for. Is there some way to modify ports on a Mac with Tahoe 26.4 and if so how can I get to them? Thanks in advance for your help.

Maybe you should start by explicitly identifying what app you're talking about.


If this app needs to listen on port 8080, then it is the remote server. You are allowing external devices to connect to your Mac. That's a bad, bad idea.


But let's suppose that internet security isn't a thing in 2026 anymore...


"Terminus" is apparently an SSH client for the Mac. You don't need that. You can use ssh in the command line. If you don't know how to use ssh from the command line and you're trying to open up port 8080 on your Mac, you are in deep, deep trouble. But I digress. We've already discounted basic security, haven't we?


PS: Terminal is a client, not a server. I don't know what you're trying to do with it in this context. It doesn't make any sense.


Normally, there is absolutely nothing blocking port 8080. That's a commonly used "catch-all" port for things that are HTTP-like, but not a true web server, or when you're already running a real web server and it's using port 80.


Do you have the Mac built-in firewall enabled? If so, turn that off. Obviously you don't need any security in the first place here. And even if you did, the built-in firewall doesn't provide any. But ironically enough, you might have found one of the few apps in the world that the built-in firewall actually does block. But there's the rub. A firewall prevents access, so you don't want that in this case. Ideally, you shouldn't be running servers of any kind, so there's never any need for a firewall. But we dispensed with that idea a few paragraphs ago.


The most likely actual "blocker" (ha!) is your internet router. By default, almost all internet modems/routers/etc. will not allow any external access like this. And if they did, they allow it only to the router device itself, not to any devices behind its NAT translation layer. What you need to do is configure the router to "route" requests to port 8080 to your Mac. How you do that depends on your router. They can all do this, one way or another.


But I think it's very important to get back to my first question. What is this app? Who wants you to install it? It actually is 2026 and the most likely explanation is that someone is trying to hack you, and hack you badly. To reiterate, you are in deep, deep trouble here.

Apr 10, 2026 11:56 AM in response to tabbyfromcanton

> What have I missed?


You've missed the fact that:


> ssh: connect to host 162.222.127.156 port 22: Operation timed out


The SSH connection to the server failed. Without that, there's no way the SSH tunnel can listen on port 8080 and forward the traffic.


So it appears that you have a basic network/SSH connection problem to the server. Without that the rest of the SSH tunnel discussion is moot.


Now you're into basic network troubleshooting to work out why you can't ssh to the server.


Can you ping that address? are you sure it's the right address? can you ssh without the -L options (just to see if that's getting in the way - it shouldn't, but simplifying is the first rule of troubleshooting).


FWIW, I tried ssh'ing to that address and was unable to connect. Presumably that means there's either no SSH server running there, or there's a firewall preventing unknown connections. If it's a firewall blocking, then you'll need to punch a hole through that firewall to allow your connection in, for which I can offer no advice beyond talking to the network administrator.

Apr 7, 2026 11:20 AM in response to etresoft

Etresoft, Snark much?

The program is called SSI. It is an accounting program that handles accounting and inventory for our company. It does connect to an external server. If connecting to an external server is a bad idea for a Mac, poor Mac. Even Windoze can do that safely. We have security in place which has not failed us (Yet). Deep trouble? Probably but still need to get this done. I would agree nothing should be blocking it but as we have been working on this I can't get port 8080 to respond in terminal. I understand it's not a web server, not what I was asking information on. It does not matter if the Mac firewall is on or off for us. Neither way has worked. Network security was not what I asked about either. That much I am cautious about. I also know my limitations and asking questions is a valid way to gain knowledge. We not be all knowing like you. As I stated rather plainly (I thought) no other computer ( I understand you may not think there is any other legitimate PC other than a Mac) has ANY issue getting out so that eliminates that as a blocker. No one is trying to hack me. Only belittle me.

Apr 7, 2026 11:54 AM in response to tabbyfromcanton

tabbyfromcanton wrote:

Etresoft, Snark much?
The program is called SSI. It is an accounting program that handles accounting and inventory for our company. It does connect to an external server. If connecting to an external server is a bad idea for a Mac, poor Mac. Even Windoze can do that safely. We have security in place which has not failed us (Yet). Deep trouble? Probably but still need to get this done. I would agree nothing should be blocking it but as we have been working on this I can't get port 8080 to respond in terminal. I understand it's not a web server, not what I was asking information on. It does not matter if the Mac firewall is on or off for us. Neither way has worked. Network security was not what I asked about either. That much I am cautious about. I also know my limitations and asking questions is a valid way to gain knowledge. We not be all knowing like you. As I stated rather plainly (I thought) no other computer ( I understand you may not think there is any other legitimate PC other than a Mac) has ANY issue getting out so that eliminates that as a blocker. No one is trying to hack me. Only belittle me.

Well if your strategy for interacting with people trying to help you on the internet is to insult them, I wouldn't be surprised if your strategy for learning about networking and security is equally effective.


My concern was based a new, and very effective, hacking strategy where someone is asked to run some commands that they don't understand in Terminal. In most cases, those people would have appreciated having someone there to tell them they were about to make a big mistake.


Now given your defensiveness and attitude, this seems not to be the case here. But in my defence, your description of the problem strongly suggested someone being unwittingly hacked on the internet. Sadly, it's even worse.


Hopefully this "SSI" accounting product doesn't have many users. Most people don't understand internet risks. They are very concerned about their personal Macs when the real risk lies with the many companies that have poor security practices. One of my favourite new websites is breachsense.com, where any given day there's a long list of companies being hacked. I'm always amazed at how far down I have to scroll on that site just to get to yesterday. How does this happen? Ah, I see...

Opening Port 8080 on MacBook Pro Tahoe26.4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.