Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to open port 80, because I wanted to host from my localmachine using; I followed the steps where it said me to install ddclient for dynamic IP.

Now I need to know how to open this port 80 from Ubuntu.

Can I use iptables for port forwarding.

share|improve this question

closed as not a real question by psusi, Geppettvs D'Constanzo, Luis Alvarado, fossfreedom, desgua Aug 23 '11 at 21:27

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

add your current iptables rules if you can. Usually ubuntu doesnt block all incoming communication. Do you have installed web server ? ( apache2, lighttpd, nginx or others... ). Little more info about your network would be nice too... are you behind your router, or do you have public IP from your ISP or ? describe your situation please. – Denwerko Aug 23 '11 at 17:56
I'm going to guess he's behind a router, and that being the case you'll need to do a port trigger or port forward. If you can get online (as in the internet) then port 80 is "open". Port 80 and port 8080 is http traffic which if your web browser works and gets online is working. – Ctuchik Aug 23 '11 at 18:05
I'm behind a ISP currently running simple http aps using nodejs or sometimes using nginx; using linsys router WRT54G; I think my ISP generate dynamic IP; – user7044 Aug 23 '11 at 18:06
Question is unclear. – psusi Aug 23 '11 at 18:13
Many service providers don't want you to use port 80 and will explicitely block this unless you buy a higher level of service (e.g. business service). I've gotten around this by using a different port. You should verify that your service provider allows port 80 to be used incoming. – Kendor Aug 23 '11 at 18:28
up vote 1 down vote accepted

I'm not sure if i understand correctly what you're trying to accomplish, but i think that what you need is to host a website from your Ubuntu box which will be available through a FQDN.

So, there are two different things that you need to do.

  1. Set up your dyndns. Again, this can be done in 2 different ways:

    1.1. Configure a cron job for ddclient.

    The script will connect to website and update your IP address at regular intervals. This solution is usually needed when ADSL routers don't provide native support for DDNS.

    1.2. Configure your router to directly connect to and update the IP address everytime it changes.

    Your model (WRT54G) supports DDNS so it's quite easy. You can find more info here

  2. Forward all incoming requests (i.e. from the Internet) to your Ubuntu webserver.

    That is, configure once again your router to accept all incoming requests from the Internet for port 80 and forward them to port 80 of your Ubuntu machine.

    Again, more information about port-forwarding can be found here

share|improve this answer
Its working now ... thanks Site - – user7044 Aug 23 '11 at 19:08

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