LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2010, 06:45 AM   #1
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Rep: Reputation: 15
Port information.


Could anyone please tell me what exactly this information is telling me as I am trying to host my own website without having to pay anything if it is possible. My biggest problem is I know nothing of ports etc..


acme@acme-laptop:~$ sudo lsof -i -n -P

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

avahi-dae 4740 avahi 14u IPv4 12647 UDP *:5353

avahi-dae 4740 avahi 15u IPv4 12648 UDP *:36095

cupsd 4779 root 2u IPv4 12698 TCP 127.0.0.1:631 (LISTEN)

nginx 5022 root 6u IPv4 12945 TCP *:80 (LISTEN)

nginx 5026 www-data 6u IPv4 12945 TCP *:80 (LISTEN)

nginx 5027 www-data 6u IPv4 12945 TCP *:80 (LISTEN)

nginx 5029 www-data 6u IPv4 12945 TCP *:80 (LISTEN)

nginx 5031 www-data 6u IPv4 12945 TCP *:80 (LISTEN)

pure-ftpd 5056 root 4u IPv4 13005 TCP *:21 (LISTEN)

pure-ftpd 5056 root 5u IPv6 13007 TCP *:21 (LISTEN)

dhclient 5404 dhcp 6u IPv4 14180 UDP *:68

acme@acme-laptop:~$



acme@acme-laptop:~$ sudo netstat -ntulp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 5022/nginx

tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 5056/pure-ftpd (SER

tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 4779/cupsd

tcp6 0 0 :::21 :::* LISTEN 5056/pure-ftpd (SER

udp 0 0 0.0.0.0:68 0.0.0.0:* 5404/dhclient

udp 0 0 0.0.0.0:5353 0.0.0.0:* 4740/avahi-daemon:

udp 0 0 0.0.0.0:36095 0.0.0.0:* 4740/avahi-daemon:

acme@acme-laptop:~$acme@acme-laptop:~$ sudo nmap -sS -O 127.0.0.1



Starting Nmap 4.53 ( http://insecure.org ) at 2010-03-07 12:31 GMT

Interesting ports on localhost (127.0.0.1):

Not shown: 1711 closed ports

PORT STATE SERVICE

21/tcp open ftp

80/tcp open http

631/tcp open ipp

Device type: general purpose

Running: Linux 2.6.X

OS details: Linux 2.6.17 - 2.6.21

Uptime: 0.018 days (since Sun Mar 7 12:05:33 2010)

Network Distance: 0 hops



OS detection performed. Please report any incorrect results at http://insecure.org/nmap/submit/ .

Nmap done: 1 IP address (1 host up) scanned in 5.809 seconds

acme@acme-laptop:~$
 
Old 03-07-2010, 07:19 AM   #2
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
It's telling you which ports are open.
All of those are ok if you want the world to see your web site (which is accessed through port 80).
You don't need to play with them, just make sure your firewall has port 80 open for http and port 21 for ftp (if you need to be able to remotely transfer files in).
Have you got a web server installed ?

Why were you checking the ports like that ?

If you have a broadband router, you need to make sure that ports 80 and 21 are forwarded to the machine with the website on.

They usually call it game and application sharing in the router setup.
You need either a fixed external ip address, or use DynDNS to assign a domain name to your dynamic address.
Then you can access your site using the domain name.

You can test to see if your port 80 is open for traffic by using an online scanner like http://www.pcflank.com/scanner1.htm

Last edited by smoker; 03-07-2010 at 07:26 AM.
 
Old 03-07-2010, 11:01 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well actually ... scanning port 127.0.0.1 doesn't make much sense,
because things on loopback will never show to anyone but yourself.


I've never heard of nginx as a webserver. And I'd use a firewall
to make sure no one talks at avahi from outside... but then you
didn't really say much about how you're going to implement that
hosting idea. Personally I'd turn off ftp
 
Old 03-07-2010, 12:02 PM   #4
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks for the reply, I have the server (Nginx) installed and the website is built and at the moment hosted. I have Bthome Hub and I have seen the game and application sharing in the hub pages and with a bit more reading I think I will understand that. The external ip address is always the same but not the same as shown in pcflank so I could have trouble their and may have to go down the dynamic road although in the hub pages there is a dynamic section that I have not studied yet. I looked at the ports the way I did because I knew no other. Any info on the dynamic part would be appreciated.
 
Old 03-07-2010, 12:14 PM   #5
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
DynDNS how to : http://www.dyndns.com/services/dns/dyndns/howto.html

You can set your DynDNS username and password in the home hub. You don't need the DynDNS clientsoftware.
You must set up the game & app sharing in the home hub to point all http (port 80) requests to the server machines internal ip address. You can see this ip address in a list of connected machines in the home hub.
 
1 members found this post helpful.
Old 03-08-2010, 05:33 AM   #6
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks again, and also for the dyndns how to. BT are sending me the latest Hub and Wednesday is the promised day it will be delivered so if I read up on how to do it I should know much more for when it comes, and then I will let you know how I am doing.
To Tinkster, Nginx is very easy to find on the web and I am told quite a good and reliable server used by a lot of well known sites. I think Nginx means engine in Russian or is pronounced engine but it is a Russian set up.
 
Old 03-10-2010, 06:52 AM   #7
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by smoker View Post
DynDNS how to : http://www.dyndns.com/services/dns/dyndns/howto.html

You can set your DynDNS username and password in the home hub. You don't need the DynDNS clientsoftware.
You must set up the game & app sharing in the home hub to point all http (port 80) requests to the server machines internal ip address. You can see this ip address in a list of connected machines in the home hub.
I have got the new Bthomehub 2 not much different to the old one. I read the howto but soon got into trouble actually trying to do it . Is there any really detailed step by step that I can get access to and can I still have the web address I have always had, it is a co.uk address.
 
Old 03-10-2010, 07:50 AM   #8
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Originally Posted by ex-para View Post
Is there any really detailed step by step that I can get access to and can I still have the web address I have always had, it is a co.uk address.
What is this web address you've always had ?
If it's an address given to you by BT for web pages then it's possible to redirect traffic to your new address.

You need a fixed ip address from BT to host your own domain name. If you have a fixed ip address then you don't need DnyDNS.

If you don't have a fixed ip address (most likely from BT unless you're a business user) then you can either use a free address from DynDNS or pay them to point your own domain name to your ip address.

Do you own the domain name you mentioned ?

DynDNS set up.

Go to http://www.dyndns.com/ and set up an account by clicking on Get a free domain name (on the left of the home page)

Then click Dynamic DNS free (DDNS)

Then click Get Started (in the right hand column)

Then choose a host name and one of the available domains.

Click on the link showing your current ip address to add it to the form.

Then click on Web server in the list of activities at the bottom.

Then click Add to cart

Fill in the form for a new account on the next page.
Remember your user name and password, as these will be the ones you want in your home hub set up.

When you've done all that, and checked out, you can move on to the home hub set up.

You will need your home hub user name and password to get to the advanced settings.
In the dynamic DNS set up page of your home hub, enter the user name, password and domain name you just got from DynDNS, and make sure DynDNS is selected in the list of providers.

Save the settings or however you apply settings in the hub.

Then you must set up port forwarding, or "game and application sharing".

If there is a list of applications to choose from, then choose http or web server if available in the list.

set your web server machine to be the computer that gets all requests for that service.


If you have problems, please post exactly what the screen says, and what error there was.

Last edited by smoker; 03-10-2010 at 07:56 AM.
 
Old 03-10-2010, 11:23 AM   #9
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
The web address is my own as is the website and I do own them. I built the site six years ago with guidance from W3schools.
I don't have a fixed IP address, I have a few laptops in my work place and they all have different addresses on the last two digits. I presume these will be the internal IP addressers. The details you have sent me look easy to follow so I will have to decide if I pay dyndns or take one of their addressers. If I decide to pay it is cheaper than I am paying to hosts.

Thank you again for the replies and I will let you know of the out come.
 
Old 03-10-2010, 11:31 AM   #10
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
DynDNS are quite cheap, about $30 I think for custom solutions so you can use your own domain. You will have to point your domain records to their nameserver. At least that's the most straight forward way.
http://www.dyndns.com/support/kb/cus...l#howto-create

Good luck.
 
Old 03-12-2010, 05:12 AM   #11
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
I have decided to try the free version to start with using a dyndns address. I am not sure what I need to do in the screen shot.
Attached Thumbnails
Click image for larger version

Name:	Screenshot-BT Home Hub manager - Dynamic DNS - Mozilla Firefox.png
Views:	24
Size:	68.0 KB
ID:	2999  
 
Old 03-12-2010, 05:16 AM   #12
arashi256
Member
 
Registered: Jan 2008
Location: Brighton, UK
Distribution: Ubuntu 18.04 / CentOS 7.6
Posts: 397

Rep: Reputation: 62
I use free DynDNS - no worries at all.
From the look of the screenshot, you need to sign up for an account at dyndns.com, select your hostname on their website to link to your account and then type in the hostname that you've got with dyndns.com in the box as shown in the screenshot.
 
Old 03-15-2010, 06:01 AM   #13
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
I have set up the Dyndns and my BthomeHub 2 using a free account, my server is Nginx and when I type in my internal IP I get Welcome to Nginx which is what should happen with Nginx. Since setting it all up for some reason I now have a different external IP and when this IP is put into my computer and the computer of a friend it also comes up Welcome to Nginx so something must be correct as it is being accessed from outside. But how do I now get to having me website on the web using my Nginx server. At the moment I have a hosted website and I have to upload changes etc.. and have htdocs. There is htdocs in Nignx but nothing is in the folder, there is also index.html and it has the Welcome to Nginx. As you can see I have no idea what to do and would please like more help on this.
 
Old 03-15-2010, 08:14 AM   #14
smoker
Senior Member
 
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 250Reputation: 250Reputation: 250
Whatever you have in your hosted servers htdocs, put in your Nginx htdocs. Rename or delete the current index.html. Try using your domain name that you got from DynDNS. It shouldn't work from inside your network, but it will from your friends computer.

Last edited by smoker; 03-15-2010 at 08:17 AM.
 
Old 03-16-2010, 06:20 AM   #15
ex-para
Member
 
Registered: Sep 2008
Location: North East England
Posts: 120

Original Poster
Rep: Reputation: 15
I cant put anything into htdocs as it will not allow me and will not copy and past the same with index.html cant even delete the Welcome to Nginx. When I put the web address I have with dyndns
into the bar it also comes up Welcome to Nginx. I cant be far away but what is the problem. I have sent a message to the Nginx forum but don't have much faith in that as not many questions seem to get answered. Stuck.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find serial port information in OLE(Oracle Linux Enterprise)?? deedhnd Linux - Enterprise 1 09-29-2008 01:18 AM
How to find out indone information and datablocks information in a file system chaitanya1982 Linux - Newbie 1 09-24-2008 01:58 AM
data structure for (app, port) information. linuxdoniv Programming 1 03-11-2008 03:51 AM
Hiding machine information and root information geletine Linux - Security 6 07-14-2006 07:57 AM
port information tarak4u Linux - Networking 2 05-30-2002 11:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration