The goal here is to set up a hostednetwork wifi on a server (fake server, it's Windows 10 x64), the client connect to this wifi, then connect to the website on the server. This is done by creating the hostednetwork :
netsh wlan set hostednetwork mode=allow ssid=BORNE-1234 key=12345678
netsh wlan start hostednetwork
IIS is configured with a simple website in it. And I just tried every bindings possible :
http borne.fr 80 *
http borne.fr 80 192.168.137.1
http (Empty) 80 192.168.137.1
http www.borne.fr 80 *
http www.borne.fr 80 192.168.137.1
Then i edit the C:\Windows\System32\drivers\etc\hosts file to add this line :
192.168.137.1 borne.fr www.borne.fr
I even tried with 127.0.0.1 but nothing works. On a browser on the server, borne.fr works. But if I connect to the created wifi with another machine borne.fr give the error ERR_NAME_NOT_RESOLVED whereas with the IP address it works. I tried everything mentioned here https://serverfault.com/a/452269.
I also added an exception on the firewall (in and out) for port 80.
Any Ideas ?
You need to also set "192.168.137.1 borne.fr www.borne.fr" on another machine.
If "192.168.137.1 borne.fr www.borne.fr" is not set on another computer, it will not know what the IP address of www.borne.fr is.
Hosts files were used to resolve hosts names before DNS. hosts files would be massive documents used to aide the network name resolution.
If you have a DNS server in your LAN, you can configure the DNS server to resolve www.borne.fr to 192.168.137.1.
Related
I am using Windows Server 2019 and in IIS 10 I have created a website and I have bound it to both: "localhost" and "mydomain.com" on port 80.
mydomain.com works correctly from any client but on the server only when I call "localhost" it works otherwise I get the following error (when called by domain):
Configure your DNS in your local server to resolve the domain name as localhost
On clients, your request domain.com is resolved by its configured DNS.
It can be on public DNS (internet) or private ones (company, intranet).
From the server domain.com, do you have access to the same DNS than your clients use ?
If not, either configure additional DNS servers :
https://serverspace.io/support/help/configuring-a-dns-server-on-windows-server-2012-or-later/
or you could edit you Host file of mydomain.com (local DNS):
C:\Windows\System32\drivers\etc\hosts
It may look like that :
127.0.0.1 localhost
127.0.1.1 mydomain.com
# and existing settings
I have website working fine on my local machine as host name hml.frontend in the hosts file: 127.0.0.1 hml.frontend
In IIS I have bindings as hml.frontend 127.0.0.1 and hml.frontend 192.168.1.94. The latter I used ipconfig to get my local ip address issued to me by my BT Home Hub 5 router.
In windows 10 firewall I have allowed App/Feature NetLogon service and World Wide Web services (HTTP).
In advanced settings in Inbound Rules I have added a rule which allow the connection from all sources to ports 80 and 443. Scope is any IP addresses.
On my macbook I have added the 192.168.1.94 as hml.frontend to the hosts file.
I can ping hml.frontend OK from the macbook.
However from a web browser the http://hml.frontend site cannot be reached from the macbook.
telnet 192.168.1.94 80 from the macbook says unable to connect to remote host.
Back on the PC I have done netstat -na to see which ports IIS is listening on and 127.0.0.1:80 is there and so is 192.168.1.94:139 and many more ports against that IP address but not port 80.
Any ideas what I can check to get my PC to listen for that website hostname on port 80?
I got it to work, I was on the right track that the IP address was not being listened to.
In order to add the ip address I have to be listened to, I went into cmd as adminstrator, did
netsh
http
show iplisten
'show' result shows that just 127.0.0.1 was being listened on port 80
add iplisten ipaddress=192.168.1.94
show iplisten
quit
'show' result shows that now additionally 192.168.1.94 is being listened on port 80
Then I went back in with
netstat -na
And now I see the line I want:
TCP 192.168.1.94:80 0.0.0.0:0 LISTENING
Some information was gained from this article.
http://windowsitpro.com/windows-server/solve-iis-listener-problems
The site is now reachable from my macbook using the hostname http://hml.frontend
I am trying to setup a remote apache server on centos. I have installed httpd and it is listening to port 80 as it is supposed to. And I am able to connect to the remote system through ssh. but when I try to access the apache server on website using the ip address browser is giving 'Could not connect to error".
My iptable looks like this
I have tried solutions from this question and none of them are working.
Could you have something using NAT in between ? If yes then you have to configure port forwarding.
If you disabled the SELinux using:
setenforce 0
then your server may be behind a firewall, or NAT, and port 80 need to be enabled there.
I have a site on node js and Grunt.
Son when in my terminal I run "grunt serve:dist" it publishes me the site on 127.0.0.1:9000
Now I want to publish this to the net, with no-ip.org
Here's what I did:
Opened ports on my router:
9000 9000 TCP/IP 192.0.1.11
linking no-ip to my router
disabling mac firewall
but either I go on a browser and do xxx.xxx.xxx.xxx:9000 or mydomain.noip.me:9000 I don't see my website!
Make sure when you call listen(port, ip) in your code that you specify "0.0.0.0" as the IP, meaning "all IP addresses". If your code is listening bound to the 127.0.0.1 loopback IP address, it won't accept remote connections by definition.
I have Two Linux Machine Redhat & Centos Under Window 7(as host) In Vmware Workstation.
I configure DNS server & DHCP Server in Redhat(10.0.0.1).
Client which is Centos is able to get IP(10.0.0.30) from DHCP server but it is not picking up name from DNS Server.
Problem is At server 10.0.0.1 i am able to ping itself by hostname like
root#server->ping server.example.com Ping successfull
But Client is not able to ping Server by Hostname like
root#localhost->ping server.example.com Ping Not Successfull
Client is able to ping Server by its ip like
root#localhost->ping 10.0.0.1 Ping Successfull
Now My questn is that Why Client is not able to ping server by its hostname & why client is not picking up name from DNS server,
Just had similar issue on my Debian VM running on a Win7 host.
Setting up DNS server isn't enough to resolve server name, especially when proxy is used in your network environment.
To solve it, you've to export http_proxy environment variable on command line before calling other executables. For example:
export http_proxy="http://{your proxy ip address here}:{your proxy port here}"
As usual, remember to add it to your profile script so you don't redo it after each boot.