I'm working on centos 8 and using Nginx, also certbot for SSL. I need to make an access from specific IP that when hit to my domain (with HTTPS) and it will be arrive to my private IP on spesific port. Otherwise, when others hit my domain it still directed to my public IP and public directory.
For example
If spesific IP:
192.168.x.x -> https://example.com -> IP_public -> NAT -> IP_private:port
If others IP:
Others IP -> https://example.com -> IP_public
Could you please give me a suggest how can I do this?
Related
I've searched the internet, but I can only find information about blocking requests from certain IP-addresses of visitors. That's not what I'm looking for.
What do I want? Hence the following situation, I'm running an apache webserver hosting a website for https://example.com on public IPv4 address: 1.2.3.4
Visitors access the site by browsing to https://example.com, but the webserver is also listening to browser requests on the servers public IPv4 address 1.2.3.4, which also serves the site. How can I disable that Apache is serving the website over the server's public IPv4 address? I only want the site to be accessible over it's site-url / domain.
I have the following config on my computer:
OS: Ubuntu 18.04
Server installed: Apache2 (XAMPP)
I have static IP bound on my computer (Let's say 100.100.100.100)
I have developed my website on the localhost and now I want to point my IP address on my localhost so that my website should be accessible on internet
How can I do that?
P.S.: I obviously can use the shared/dedicated hosting but I don't want to go for that and my computer has 24*7 internet + power.
I think you can adding NAT rules to you router, if your Apache server use port 80 and 443 you could try NAT these ports from 100.100.100.100 to your external IP address or dynamic dns name (if you have one).
I think is better if you register a dyndns name, if you don't have a static external ip address.
I have subscribed to Local Broadband plan in Delhi, They have 1 static ip through which their all subscribe use it. When I Enter my ip from outside then it will forwarded to their Local IP management Software Page. How can i access to my web server, Is there my port forwarding technique like through unique port i can access to my localhost from out side or any other way. Even Dynamic DNS service like no-ip isnt working. they all are landing on same IP Management page.
Thank You in Advance.
Note: Using Nginx on Raspberry Pi.
The problem is with your Local Broadband company. Sounds like they need to do the port forwarding, or you from that "management page" you get to access.
You have to be able to forward port 80 from your router (the one with the Public Static IP) to the private (NAT) IP of the PI; both on port 80.
I have just set up a WAMPserver2.5 localhost on my computer. I have everything running properly (I can execute PHP, MYSQL, etc...) and I forwarded port 80 to my ip adress 192.168.1.4 (I can get my localhost page from my public ip) am now wondering how I would point my public ip to a domain name that could be accessed outside of my network.
Is this possible? If so, how would I do that?
Thanks!
I used No-IP to do that. They offer free subdomains but you can also purchase an own domain.
I have a wordpress site on my debian server. I have done the port forwarding successfully (verified this) to access outside the network. However I get the below error when i try to access outside the network. Am i missing something? Sites-available is set to documentroot at /var/www, which is where my wordpress folder is.
The requested URL /XXXXXX was not found on this server.
Apache/2.2.22 (Debian) Server at 10.1.1.4 Port 80
I really hope someone can help me on this as i have spent almost a week over this.
Thanks!
I do this kind of stuff on daily basis. Lets go through the basics.
Firstly, confirm that you can access your server within your private network http://yourserverLANip:80
If possible, do not use server itself to test it (eg localhost:80), use other device as laptop or any other device within the same LAN.
With that test you can confirm that:
apache listens on port 80
apache accepts requests from other clients within your private network
wordpress is set up correctly
If wordpress site pops up we can assume that apache and private network configuration is correct and you'd need to move your debugging to WAN/public network configuration.
It would be wise to recheck apache security settings at this point.
From here, things get a little more complicated.
I believe you mean public WWW when you say "outside-the-network". You want to make your site public to every internet user on the planet.
I assume that you have a registered domain name (eg yourwebsitename.com) and a static public IP address at the location where the server is located (if you host it at home, static IP is fixed to your modem).
These two are "must", if you want to host anything that public can consume.
If you host your apache for yourself, you dont need your domain name, but you'd need to access your server through your public IP yourpublicIP:80 and it's not easy to use for other people.
Now lets go on with WAN debugging.
Validate that:
your domain DNS WWW settings are pointing to your public IP address
at your server location. you can do it through the control panel of
your domain registrant company.
you have a static public IP address where your server is hosted
your modem accepts incoming ports (80). this is done through modem
firewall settings.
that the port 80 is redirected to your server private IP address (LAN
ip).
The flow for redirecting clients to your server is something like that:
Client->WWW->internet service provider->yourpublicIP->modem->yourserver at LAN
Good hunting!