Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Ideally I'd like to expose a port, like 8080 or something, to the web, so that I can run a website on my desktop and inspect it on my smart phone or show it to a client and so on. How do I expose one of my ports to the web in Ubuntu? I am typically working on a home WiFi, I don't have to mess with my router do I?

Any help would rock!

Update:

I use node.js for a server, and when I navigate to 192.168.my.ip:8080, I get a typical error message:

Unable to connect      
  Firefox can't establish a connection to the server at 173.52.xxx.xxx:8080.
  The site could be temporarily unavailable or too busy. Try again in a few
    moments.
  If you are unable to load any pages, check your computer's network
    connection.
  If your computer or network is protected by a firewall or proxy, make sure
    that Firefox is permitted to access the Web.

When I go to just my ip address, without a port, I'm prompted by my ISP to log in, which implies that there's some kind of firewall?

Update 2:

I figured it out : ) I needed to do some port forwarding and expose one port to TCP traffic. My Router was rejecting all inbound requests, so I needed to create a temporary exception to the rule. Ah, what a lonely productive Saturday night. Bittersweet, mostly bitter.

share|improve this question

2 Answers 2

if you just want to access your localhost then, setup a web server like apache and then just go to the local ip of your computer from your smartphone.

  1. install apache with sudo apt-get install apache2.
  2. now put some HTML files in /var/www/
  3. Go to your local-ip of the computer from your smartphone. (you might need to add the file ending to the address like 192.168.0.100/MyWebsite.html)

If you want to access it from the Internet, then you need a domain name, and a domain service to host it at.

share|improve this answer
    
I use node.js as a server, and I get an error message when I navigate to my ip:myport. I updated the question with more detail. –  Costa May 12 '13 at 3:27
    
@Costa you don't need the port. USe Apache it's so simple and easy to use... –  Alvar May 12 '13 at 10:06
    
No thanks, I'm happy with node. –  Costa May 13 '13 at 1:34

From the OP's update:

I figured it out : ) I needed to do some port forwarding and expose one port to TCP traffic. My Router was rejecting all inbound requests, so I needed to create a temporary exception to the rule. Ah, what a lonely productive Saturday night. Bittersweet, mostly bitter.

share|improve this answer

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.