IIS: public website - iis

I've hosted my website and I can see it well through: 192.168.247.1/api/products.
Now, I would like to make it public on the internet.
I did:
IIS Manager -> Bindings -> add: ip=104.56.153.245, port=42485.
Forwarding port by the router's interface (made port 42485 available).
Checking windows firewall will not interfere.
*The public ip is what I've got by whatismyip website.
So I tried to get: 104.56.153.245:42485/api/products,
but all I got was a timeout.
Am I doing something wrong?

I would prefer letting the Internal IP binding be as it is in IIS.
Then setup a port forwarding route from external IP to the internal one.

Thank you Rahul Soni!
It was one of two things that had solved my problem.
In general, I had a confusion between 192.168.x.x IP and 10.0.0.x IP,
my advice: use merely the latter one.
1) The binding of IIS Manager should contain 10.0.0.x IP with some port (42485 in my case).
2) Forwarding port by the router's interface (making port 42485 available) should also forward to 10.0.0.x IP!
The way of checking whether the port is right or not, would be done by the site: http://www.canyouseeme.org/
or http://www.yougetsignal.com/tools/open-ports/
Hope this would help other people with that irritating problem.

Related

Hosting a web site in IIS accessible from any web client?

Trying to host a web site on my local Win 10 Pro machine withing IIS, provided I share the IP to my friends. My host file contains something like:
127.0.0.1 site1.com
127.0.0.2 site2.com
127.0.0.3 site3.com
127.0.0.1:1 site4.com
127.0.0.1:2 site4.com
123.45.5.6 site5.com
123.45.5.6:33 site5.com
They all work as expected except for the imaginary external ip (only for example), and adding the port or not makes not difference. Seems i've tried what makes sense, say my external is '1.2" Creating a host entry like
1.2 # or
1.2:Port # the external IP with port
Also attempted adding an exclusion for he firewall to help ensure the traffic is allowed by doing:
netsh advfirewall firewall add rule name="Open Port" dir=in action=allow protocol=TCP localport=81
Kind of lost what might be missing, any suggestions?
Thanks for he help.
First. There is no need to add port after IP address in hosts file. Port can be configured on IIS by setting binding.
Second. If you want to allow any web client can access the site host on local WIN10 pro, you need to make sure WIN10 pro and web client are in the same LAN. Otherwise it is need to buy a public domain and bind to WIN10 pro device.
Using Ping command is a great way to test traffic between devices. It can help you make sure if web client can create connection with WIN10 pro.

Unable to open apache website from internet of my Raspberry Pi B+ V2

I setup Apache server on my Raspberry Pi.
In LAN it is working fine.
But when I tried to open it with my public IP it simply gets Timed Out.
I opened a Port : 2323
Checked on canyouseeme.org
Means I have configured port forwarding correctly...?
Now I am trying to open this page with url: 122.175.144.237:2323 it shows Time Out Error.
I have 2 devices
Binatone ADSL2/2+ Modem+router
Tenda N3 Wirless N150 WiFi Router
and my Raspberry Pi is connect with WIFI with static IP 192.168.192.99
I searched for this problem but till now not found any appropriate solution.
Is there any problem in configuration of Apache? or I missed some configuration. or it is because of apache restricting to open page with public IP or not allowing to open over internet.
Is there any way..?
Even if the port is open on the external interface of your router, that doesn't necessarily imply that port forwarding is setup correctly, just that the router isn't flat-out rejecting that traffic. Also, as you have a second wireless router in your network (that is probably itself running NAT), you must also have port forwarding setup on that as well.
Apache must also be configured to answer for the virtual host it is being addressed as. It should answer on it's IP with a default page, but without knowing specifics I couldn't rule it out.
That should get you started, but at this point you still need to narrow the problem down quite a bit before proceeding.

Troubles accessing the VirtualHost on a local net

Hi I have a Huawei ADSL modem with a dynamic IP. I set up a dynamic dns with freedns and I can easily access my Virtual host on apache from outside my private network, from internet.
So trying to access it from a local network I get a modems login page.
I have the rule in my modems NAT to connect port 80 to my server but it seems it doesnt work from internal net.
My server hosting the virtual host is 192.168.0.1 , the modem has the 192.168.0.254 address.
I tried to put my external domain name into the /etc/hosts file, but if I do that then asterisk server gets confused.
What could be the cause of the problem ? And what would be the best solution to this problem ?
Should I set up a caching DNS on the private side of the net ?
Hugger is half right... Its because your router is blocking loopbacks. The easiest way around this is to edit the hosts file (See the Wiki page) on the computer that is behind the network to see the local IP of the computer as the virtual host your going for. For example if your server is on 192.168.0.1 and the virtual hostname is www.imrad.com then insert
192.168.0.1 www.imrad.com
into your hosts file. If your computer leaves the local network (like a laptop you take to work) and joins a network not behind your router you need to comment out the line in the hosts file.
well actually to access that you must find the local ip address of the server by going into command line/prompt and typing ipconfig /all then you will find ipv4 address. Take note of that.
Go to another computer and your that ip and it will show.
The reason that was happening is because the router/modem knows you are in its network so it will think you ar trying to go top the login page of it. That happens to me too.

accessing app from public ip

I have one linux server which has one public ip. I have deployed one webapp which I can access using internal ip address like - http://[internal_IP]:8080/blackbox/Index.jsp which works. but when I try to access the same from public ip http://[public_IP]:8080/blackbox/Index.jsp, it does not work. Can you please suggest how can I make it work?
Make sure Tomcat is listening on your public interface by:
netstat -an
Listening on *:8080 is ok, but 127.0.0.1:8080 means it is only listening on the local loopback interface.
Also check your topology. There can be a local firewall software stopping incoming traffic. Also if you are behind a NAT, the port has to be forwarded to your macine.
If you're using a consumer grade router, it might be the problem. I've come across way too many cheap routers that got confused when you tried to connect from your LAN to your external IP... But it all works fine if you connect from outside your LAN.
So check that other networking services or such work if you connect using your external IP.
It can be your linux firewall, or your router is not portforwarded for this service.

xampp server (How to get up and running)

I've been developing locally on a little ubuntu netbook with xampp for about 7 months. Two weeks ago I got a computer I'd like to use as a server. I've installed the latest Ubuntu distribution and xampp, moved all my files over, and forwarded port 80. I've also got a domain name from dyndns.com which is being updated by a client which runs in my router (a Netgear WGR6154 v8).
Now, when I try to access my server by typing in the address I got from dyndns.com the browser loads until it timesout. I can access everything locally using localhost as the address so I believe xampp is running, just unable to connect with the internet.
In order to be able to view my files over the internet what should I do next?
Thanks to all in advance...
[I'm starting a bounty for the first person to help me get my files successfully online]
You have a combination of issues here, and that is something of a problem. Each issue is complex in an of itself. Here is what I would recommend to get you going for certain.
First verify that you can surf the web from your server. This will confirm that you have a working ethernet interface.
Step 1 make sure that XAMPP, and your files are viewable from your home network. I assume you are using something like 192.168.1.X for your network and perhaps your server is 192.168.1.10
Go to another computer in your house and type http://192.168.1.10/ and see if you can see your files. If you can then you know that the server is properly configured and XAMPP is working.
Then add an entry to your hosts file to resolve yourdnsrecord.com (or whatever your dyndns record is) to your private ip address. Then when you type yourdnsrecord.com into a browser from that computer you should still get your files. This will rule out your server being improperly configured to listen for that domain name.
Next you need to test to see if there is a firewall problem. To simplify this, first remove your home router from the equation. Instead, place your new server directly onto your internet connection. (assuming you can). This way, you do not need to have NAT or firewalls properly configured. Your dyndns name should map to a public IP and your server should then have that IP and be connected directly to the Internet. If you have your server directly connected, and the command ifconfig from the root prompt returns the same public IP address that your dynamic dns record is point to, then it should work.
It will make your life easier if you have an iphone or some other way to test how your network is seen from the Internet.
If your public IP as shown by ifconfig is different than the IP record in your dyndns account, then your dynamic dns update script is broken. manually set the IP, and see if things work.
It is very possible that this will not work. Some ISPs firewall port 80 preventing their subscribers from hosting servers. Once you have your server directly connected to the internet you can test this (even if your dns is not working) by using the public IP address. As root, type ifconfig from the command prompt to get your public ip address. Then type the command tcpdump -i eth? port 80 from the root prompt. eth? needs to be the same interface that you saw had a public IP address from the ifconfig command. usually this is eth0 but it might be wire0 or something like that.
This command will show you all traffic coming on port 80 to your server.
From an iphone (or whatever second Internet connection you have) browse to the IP address that you got from your ifconfig command. If you see something on your server (and it is directly connected to your ISP) then your ISP is not firewalling you.
If you can get to your server, when it is directly connected to the Internet, either by IP address or by DynDNS address, then your ISP is OK and it is time to debug your firewall.
Two things need to work for your firewall to be configured NAT, where the public address that your router gets from your ISP is converted into your private network and a firewall rule which permits that traffic. If you get this far, then you know your firewall is the problem and then it is just a matter of getting its configuration correct. There are far to many home routers to document here, but you usually can find how-to instructions for your router for this task from the manufacturers website (usually it is part of the manual)
If you follow these instructions exactly you will get your system working. Make comments on the process and I will be happy to modify this to make it clearer.
HTH,
-FT
You should make sure your xampp is not listening to only the localhost.
to do so edit your apache configuration file and check and search for Listen directive
you should be able to know also by analysing the output of netstat -a.
After that make sure your router is forwarding properly, using tcpdump would help.
drop me a comment if you need more help.
Cheers

Resources