Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

How can I open access to port 8080 from the outside world (private lan) on my Mac OS X Lion? I'd like to access a webpage that's running on my lamp stack on my mac (zend server ce) from within the lan. I can access port 80 just fine. Port 8080 is blocked on the other hand. I've also disabled the firewall.

share|improve this question
    
Where are you wanting to accomplish this? At work or home? –  erimar77 Nov 15 '11 at 23:33
    
In any arbitrary lan. –  VinnyD Nov 16 '11 at 1:27
1  
Is Apache configured to listen on Port 8080 yet? –  Miles Erickson Nov 16 '11 at 3:14
add comment

migrated from serverfault.com Nov 16 '11 at 3:19

This question came from our site for professional system and network administrators.

3 Answers

up vote 5 down vote accepted

When you say that you disabled the firewall, do you mean the one in: System Preferences > Security > Firewall, or the ipfwIP Firewall that you can access from the command line? Or perhaps both?

To check to see if you have ipfw rules, you can always go to the terminal and type in:

sudo ipfw list

You might also use nmap to check if the port is open from different places on your internal network. Of course, OS X doesn't comes with nmap by default, so you would have to try that from a Linux machine or use something like Fink or Macports to install it.

nmap -p 8080 host.domain.com

I hope this helps.

share|improve this answer
4  
This doesn't answer the question - how to open a port. It only suggests ways to check if the port is open. –  Madbreaks Apr 9 '13 at 17:35
add comment

You can disable firewall or you can allow a certain application to accept incoming connections. Plus to allow access to the outside world (e.g www), you'll need to forward traffic to your internal gateway:port via your router settings.

Here's how to do this:

  1. Mac->Sys Preferences->Sharing->Enable “Web Sharing” checkbox
  2. Mac->Sys Preferences->Security-> Turn off firewall, or allow your application to accept incoming connection
  3. Open a port on the router (via 192.168.1.1) to forward traffic from your_web_ip:port to a local_gateway:port

    1. Router Settings -> Port Forwarding -> create rule: forward to local gateway (e.g. 192.168.1.4), custom port, protocol tcp, source=any, destination=3280, all connection types, forward to port = 8080.

Done. Now from the remote computer, open your browser to your web ip address (find via http://www.whatismyip.com/) + destination port# above, e.g. 72.189.194.65:3280, this will connect to your local 192.168.1.4:8080

share|improve this answer
    
I'm missing the third point: How to access to router settings? I don't find any option on preferences. –  Ramy Al Zuhouri Mar 17 '13 at 16:45
    
You can get access to your router usually by 192.168.1.1 with admin name and password. –  Chase T. Mar 19 '13 at 1:47
add comment

If the firewall is off and you're sure Apache is listening on :8080, then you must have a firewall upstream somewhere that's blocking 8080. Unblock it there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.