How to make the ip of my computer public so that devices outside the same network can access webservice in that particular ip - networking

i have an android application using webservice which is working fine from inside a network. i mean, if both mobile and computer are connected to the same network, i can run the app perfectly, but if i change network of any one of it to another network then, 'cannot establish connection to server' error is shown.
What i want is to get an ip from which i can acess the app from any network
this is how my connection code in the android application looks like
mWebview .loadUrl("http://192.193.194.195/Application/startpage.php");
please give me step by step instructions, i searched for it a lot, but i couldnt find a good answer for my level 0 networking knowledge :)
Thanks

You have to host the server on a public IP address where every network can see the server.

Then you have to use the external/internet ip addres of your router. Find out with http://whatismyip.com Then on your router forward port 80 to your pc with ip 192.193.194.195.

Related

What could be the reason behind "ERR_CONNECTION_TIMED_OUT"?

I am using (airtel xstream fiber) connection and trying to do port forwarding. I forwarded port 3000 of wan and direct it to my system ip address 192.168.1.2 on port 3001.
Node server is running on my system on port 3001. And I can access my hello world website locally using 192.168.1.2:3001. But when I am trying to access using public ip, it show this error code "ERR_CONNECTION_TIMED_OUT".
Also, I found my router port 3001 is open using online port checking tool/website.
So, Can anyone please tell what could be reason behind this ? Is this the problem with windows.
You first need to check what ports are open by your ISP. If your ISP is giving you a local ip at the router. Basically, creating a ppp connection. It may be using a cg nat. In that case you need to buy a static ip, without that none of the traffic will be Directed to your router. Let me know if you find something, I'm currently looking to get xstream airtel as well.
No there is no need for static IP to be access server remotely. As of now, What I see is airtel allocates new ip every 24 hr or when router got disconnected. To access your server remotely you can do two things. First one is more secured.
Change Primary IP adress of your airtel router and use Portforwarding so that its port 80 will be free for you.
Enable DMZ and point it to your local server IP. [192.168.X.X]. In this case all of your ports of the device are exposed to internet. If you want to be secure. Make sure add another router between server and airtel router and enable port forwarding.
But in this case there is a catch, When you try to access your local website using public ip (which you can see on google search) it will redirect you to airtel router panel. But when you try to access it using other device (not server otherwise server will get disconnected) connected to internet using other network(other that your current airtel router like JIO sim, Airtel Sim, etc), It will work excellently.
To get rid of dynamic ip use no-ip services. Its website will help you more. Basically, It is dynamic dns server where you will get free domain. That will get update regularly while its service running on your system. To use other dns provider service like godaddy you must need an static ip.

Using WAN IP to connect to a device connected to router

I have a router (belkin) with many devices connected.
I ran a application on one my devices and the application assigned a port number for remote connection.
Now for me access this device i tried doing something like:
wanipaddress:port
But unable to connect. I am not sure if the router can be used to accomplish the above.
Any suggestions on how to achieve the above?
P.S my router assigned unique LAN IP to all the devices.
I achieved the following using Port Forwarding mechanism. A port forward is a way of making a computer on your home or business network accessible to computers on the internet, even though they are behind a router.
I found the following tutorial to be useful:

How To Access FileZilla Remotely?

I've Created My Own FileZilla FTP server and I wanted to access it from my local Network.
So I've done that. but there are Two Problems I'm Facing right now.
Problem 1:- Can't connect ON PC which is connected with same Router But with LAN
My father's PC is connected with LAN And My Laptop is Connected with WiFi
So over WiFi with Any Device I can connect to my Server but when I try to connect my FTP to my father's PC (which is connected on LAN and with same Router)
I can't connect it
Problem 2:- Can't connect it Remotely
I want to access my this FTP server with Internet so that I can connect it with Remotely. I've referred on so many websites. but Can't Find a complete step by step Tutorial... I've Configured my FTP but still Can't connect it with Internet for remote access.. plzz help me out.
Thanks In Advance...
Problem 1: As you say wifi-connected devices can access the server, so there are different cases you shall check, as where my experience reaches, these two might be the reasons:
Is client/network isolation enabled in your router's wifi settings? This can be checked and solved by accessing your router's management console.
Is your father's PC on a different subnet (XXX.XXX.SUBNET.XXX)? If so, you have two choices, changing all devices' subnet masks to 255.255.0.0 (This might be applicable in your router's DHCP settings too.), or changing your father's PC's IP address to match the local subnet.
Problem 2: This has two solutions, both need resources that might not be worth it, but yet:
Connect to a virtual private network on the cloud (VPN), this way, your PC will become a part of a private network. You can connect other devices from other networks which can access the VPN server to the private network, so your PC and the device will now be in a same network like in your home network.
Some ISPs provide static IP addresses or internet plans with static IPs. Check if the internet plan you use is so, if not, you might be able to rent an IP address from them. With static IPs your network can be accessed from the internet. Anyway there might be a bit of effort needed to ensure that your PC is accessed in the first place.
And just letting you know, this question must be moved to the Super-User Forums.

Create a local wireless without internet

I would like to create a local wireless without internet.
I would like to have the possibility to connect 50 clients and access to a website using a domain name.
That means, I need a DNS and DHCP.
I sreach on internet an I found a way to achieve that but not totally and i am not sure if it will work and if it is the best way to achieve that.
I can maybe have a mini PC (server) with ad hoc network and have the client to connect on the server but:
Will it be possible on a connection to assign a ip to the client and set a DNS server ip on the client as the same ip of the server.
I found mini PCs but how can I know if the PC will handle a lot of client ? Which network card to choose ?
I think also that a router and configure DHCP on it to distribute the IPs but I would like to have one box ready object as a mini PC.
I need an advice on the best way to go with what i want to achieve and materials i need to buy and good references.
For a linux domain controler you will need to install bind to host your own DNS. It's a little involved to set up, but necessary if your network doesn't have a DNS server. If you're using a windows domain controller you will need a server OS (expensive). If you only have 50 clients the DNS resources needed will be small and you could run bind from any old box, even a Raspberry Pi. You will also need a host machine for the "website" a.k.a. an intranet. This can be the same machine as your DNS server, but can be any computer on the network. When all is done you will have your router configured with the IP of your local DNS server. The DNS server will point your local domain to whatever box hosts the intranet website.

Setting up local wireless server using WAMP

My goal is to have two laptops in a network. One is acting as a server, serving webpages to the other. The catch here is that neither is connected to the outside internet.
What I have done so far is setup WAMP on the server laptop, and it successfully serves web pages on localhost. Now I want to access these pages on the other laptop.
To do this, I had the server create an ad-hoc network and connected the other laptop to it, but I'm stuck - and I'm worried I'm not on the right track. I followed this tutorial but in the end I figured out that just explained how to spoof a text URL as an IP address, and not really what I was looking for.
So I guess I have two questions:
Is my method the best way to do this (with ad-hoc networks)? Is there some way to connect a laptop to a wireless router and have the laptop act as a server to another laptop?
If my WAMP and ad-hoc network should work, how do I connect other laptops to my server through the ad-hoc network?
Thanks!
I would suggest the first option: get a wifi router. Then you can assign static IP adresses from the routers private network or use DHCP server on the router. Hopefully you will have an option to reserve IP adresses on DHCP server so you dont have to check every time what IP adress the laptop acting as a server got. You use this address to access your web server. Also, you can use this router later as a gateway to the internet if you want.
In ad hoc mode you will probably get an address from 169.254.0.0/16 link-local scope, and you can check it by running ipconfig as #Robadob already suggested.
On your hosting laptop open cmd and call ipconfig look for the internal IP address on the network interface your hosting the ad-hoc network.
Enter that IP address into the browser on your client laptops web browser instead of localhost.
If that doesn't work, try other ip addresses listed by ipconfig (incase you used the wrong) and then check the properties of your ad-hoc network, windows firewall and any other firewall software to disable anything that might be blocking it.
An ad-hoc network is suitable option for what your doing, most people would probably use a switch or router though, however that requires hardware you probably don't have.

Resources