Computer Science, asked by AniketSoftDev, 1 year ago

for making server which ip to use , laptops public ip or router public ip

Answers

Answered by SUROJHALDER
1
This is the part 2 of the article series on hosting a website on the internet using your own laptop. In part 1 we developed the concepts of internet structure and functionings. In this part, I will guide you through the process of getting the website hosted and running on the internet.

Here is the demo of a live server running on my laptop:

https://janishar.com/

Part 1 link:

https://blog.mindorks.com/how-to-convert-your-laptop-desktop-into-a-server-and-host-internet-accessible-website-on-it-part-1-545940164ab9

One important concept in the communication over the internet, are ports. So, what is a port?

A port that we generally heard of are used to connect monitor, webcam, speakers etc. On the physical layer, a computer port is a specialized outlet on a piece of equipment to which a plug or cable connects.

But the port that we are referring to from the internet or software perspective has a different meaning. In the internet protocol suite, a port is an endpoint of communication in an operating system, in software, it is a logical construct that identifies a specific process or a type of network service.

A port is always associated with an IP address of a host and the protocol type of the communication, and thus completes the destination or origination network address of a communication session. A port is identified for each address and protocol by a 16-bit number, commonly known as the port number. For example, an address may be “protocol: TCP, IP address: 1.2.3.4, port number: 80”, which may be written 1.2.3.4:80 when the protocol is known from context.

What the above text basically mean is that any communication between network devices take place over a port, which is a software construct that helps in data reception and processing for the network devices. The port, which is the number after “:” in the IP address defines the port on which the data has to be sent. We must have seen port numbers in the URLs. By default, HTTP uses port 80 and HTTPS uses port 443, and we don’t add them in the browser but are implicitly handled by the browsers. But a URL like http://www.example.com:8080/path/ specifies that the web browser connects instead to port 8080 of the HTTP server.

What is port forwarding?

Port forwarding or port mapping is an application of network address translation (NAT) that redirects a communication request from one address and port number combination to another while the packets are traversing a network gateway, such as a router or firewall. This technique is most commonly used to make services on a host residing on a protected or masqueraded (internal) network available to hosts on the opposite side of the gateway (external network), by remapping the destination IP address and port number of the communication to an internal host.

What this mean is that when a request arrives at a router at a specific port then it reroutes this request to a server in the local network of the router so to be able to process it (if configured on NAT settings). So, it in a way works as a gatekeeper.

The IP address on the web server in a number like 123.123.123.123 but how does http://www.example.com be able to communicate with that server?

example.com is called as a Domain name. Domain names are the human-friendly forms of Internet addresses and are commonly used to find websites. The domain name system(DNS) is essentially a global addressing system. It is the way that domain names are located and translated into Internet Protocol (IP) addresses, and vice versa. A domain name such as example.com is a unique alias for an IP address http://123.123.123.123:80, which is an actual physical point on the Internet. The Internet Corporation for Assigned Names and Numbers (ICANN) is a non-profit organization responsible for coordinating the maintenance and procedures of several databases related to the namespaces of the Internet. We can buy a domain name like I did with janishar.com from a vendor like GoDaddy and others for a period and then tell that domain to point to an actual server address using the websites of those vendors.

What is public IP address?

A public IP address is an IP address that our home or business router receives from your ISP. Public IP addresses are required for any publicly accessible network devices, like for our home router as well as for the servers that host websites.

Public IP

Similar questions