LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Port information. (https://www.linuxquestions.org/questions/linux-newbie-8/port-information-793764/)

ex-para 03-07-2010 06:45 AM

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:~$

smoker 03-07-2010 07:19 AM

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

Tinkster 03-07-2010 11:01 AM

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

ex-para 03-07-2010 12:02 PM

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.

smoker 03-07-2010 12:14 PM

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.

ex-para 03-08-2010 05:33 AM

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.

ex-para 03-10-2010 06:52 AM

Quote:

Originally Posted by smoker (Post 3889354)
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.

smoker 03-10-2010 07:50 AM

Quote:

Originally Posted by ex-para (Post 3892786)
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.

ex-para 03-10-2010 11:23 AM

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.

smoker 03-10-2010 11:31 AM

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.

ex-para 03-12-2010 05:12 AM

1 Attachment(s)
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.

arashi256 03-12-2010 05:16 AM

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.

ex-para 03-15-2010 06:01 AM

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.

smoker 03-15-2010 08:14 AM

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.

ex-para 03-16-2010 06:20 AM

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.


All times are GMT -5. The time now is 11:01 AM.