Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am new to networking, so there are a many things that I do not understand.
I have set up an old pc as a server and have installed Ubuntu 12.04 server.
I have a router connecting it to the internet.
I have devices connected to it locally.
I can ping all the following IP's
127.0.0.1 ( I Don't know what this is. )
127.0.1.1 ( this is my PC server hostname "Server1")
192.168.1.1 ( my routers IP )
192.168.1.20 ( this is the device I want to connected to my PC server )
192.168.1.50 ( the fixed IP that I have assigned to my PC Server in the router)
From my laptop, plugged into the router, I can putty into my server ok.
From my laptop I can access the device and set the following info:
URL: IP:PORT
username
pwd
and or the Networking menu, where I can either tick the DHCP box,
or enter values for: IP address; Netmask ; Gateway IP and DNS IP
I have tried all sorts of combinations. Nothing works.
The device does not recognise my PC server.
Where am I going wrong ?
any ideas ?
My ISP gives me a dynamic IP, but behind the router I have assigned Static IP's to each device,
In the router I have assigned 192.168.1.20 to the device I want to connect to, (its a camera I bought 2nd hand in Bangkok, but without any documentation).
and I have assigned
192.168.1.50 to the PC box that I have running as my server.
I have learned that 127.0.0.1 is Localhost, when I type in #localhost.localdomain and 127.0.1.1 is the IP shown as my PC box.
This confuses me, as apparently I have two IP's for the same piece of equipment. ( should I not have allocated an IP to it in the router ?
I have been reading about ports and port forwarding, but not really fully understanding this.
Do I need to assign a port number ( as part of the IP address )for each device even if it is within my own LAN, ie behind my router ? and what does port forwarding mean ? Do I do this in the router or in my server-PC box.
Basically 127.0.0.1 (localhost or local loopback device) is a virtual IP address exists on all network capable devices to access network services from itself. The physical network adapter is assigned an IP address like 192.168.1.50 either as a static or via a DHCP server.
A good analogy is that the IP address / port number is like a street address / apartment number. There are 65536 available ports and the port number is defined by the service i.e. some defaults are web server is 80 and ssh server 22.
Basically port forwarding is translating an IP address/port to a new destination. An example is if you want to access a web server on your local network from the internet. You would set up port forwarding for port 80 on the router to the IP address of your server.
So you can access the IP camera from your laptop. Without knowing anything about the camera is a bit difficult to provide help. One type of camera will send pictures based upon a time interval or movement to a ftp server. You would need to configure a ftp server on your computer.
Thanks Michaelk,
I appreciate your taking time to offer me some help.
For my own understanding can I ask you to clarify in my mind what I need to do.
You say that I need to Port Forward port 80 to the IP of my Server.
So I log into my router, go to port forwarding.
There I see a mask showing WAN Interface: PVC0 ... PVC9
and a table of data that needs to be filled:
Service name: -( user Defined )
External Start Port:
External End Port:
Server IP Address:
Protokol - ( all )
Open Start Port:
Open End Port:
So, do I just choose a number, say "5432", as the port I want to forward, and just enter it everywhere into the table ?
using 192.168.1.50 as the IP address for my server, ( ie the IP address that I allocated to it in my router )
Or do I need to enter my own IP address from my ISP. ( which is 86.25.vw.xyz )
Port forwarding at the router would only be required if you were trying to access the camera from the internet. I was just trying to provide a basic explanation of what port forwarding does.
The port number is set by the service i.e. in this case your camera.
discovered open ports:
22 ssh
80 http
139 netbios-ssn
445 Microsoft ds
3333 dec notes
9000 cslistener
So the device is there and available.
I think I have learned a wee bit more now, so I will try a few things out.
There is no data to lose on my PC-box server, so the worst that can happen is that I need to reinstall Ubuntu, and throw camera in the bin.
I appreciate all your replies,
thanks,
-E
Did you verify the IP address used in the nmap command was that of the camera?
Port 139 and 445 is used by Microsoft's file and printer sharing networking protocol CIFS/SMBFS (samba in the linux world). You should be able to access files saved by mounting a share on the server.
I believe you have already used the camera's web setup pages (port 80 httpd). 3333 and 9000 are open but I can not say what service is using it. What is reported in the output is what ever is saved in the /etc/services file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.