Jump to content

Others can see my apache web server, I can't. Help?

KieuVanQuan
Go to solution Solved by Jarsky,

The ability to loopback on your WAN IP / Hostname, is dependant on your router, not your ISP. 

A lot of higher end routers like Drayteks, Microtik's, Asus, etc...have bind - as well as more advanced router firmware like Tomato or DD-WRT. 

Generally in your router firmware its called NAT Loopback.

 

If your router doesnt have it, and you don't want to get a new router, then if you're going to be using vhosts or want to be able to access it with a hostname, you'll need to edit your local computers hosts file. 

 

e.g in C:\Windows\system32\drivers\etc edit the hosts file like

mywebsite.local     192.168.1.123

 

I set up an apache web server on local lan ip, properly forwarded port, added fire wall exception and inbound rule on the corresponding port. When I try to access it from my own network it says the on the chrome webpage that it has refused connection. And the error code is this: err_connection_refused. I tried several browsers, none of them can reach my server.

But everybody else from different networks, different countries can see and access it without a problem. Can anyone help me? Because now I set up an SQL server and the same problem occured that I can't connect to it....

 

Thanks.

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

Which address so you use when you try to access the web page locally? Try going to 127.0.0.1 and see if that works better than your public address. 

Link to comment
Share on other sites

Link to post
Share on other sites

Sounds like a firewall issue on the server or your switch.  It's disallowing LAN IP's, but allowing WAN IP's.

 

 

Main Rig:

Case: Lian Li Lancool Mesh RGB

CPU: Ryzen 5 3600 

Cooler: CoolerMaster MasterLiquid 240

MB: MSI B550 Gaming Pro Carbon 

Ram: Gskill DDR4 3600 x 32GB 

GPU: Asus Arez Strix Vega 64 OC

PS: Seasonic FOCUS Gold Plus Series SSR-750FX

SSD1: Crucial P1 1TB NVME

SSD2: Adata SU800 512gb M.2 Sata

HDD: Hitatchi 2tb 7200RPM + 3x 2TB WD Passport USB 3.0

Monitors: AOC C24G1

Keyboard: Cheap Blue Knockoff Mechanical

Mouse: Uhuru Gaming Mouse
OS: Pop! 21.04



Current Vintage Equipment:  Please ask me about it, I love to talk old tech!
IBM Thinkpad 390, IBM Aptiva A12, IBM PS/2 Model 25-004.  Compaq Contura 4/25C, Presario 7596
Asus P5A-B Socket 7 Box, Tandy 1000RLX-HD "B" & 1200-2FD, VIC20, Zenith ZFL-181-93, Packard Bell 300SX.

Apple II/gs, Mac Plus x2, Mac SE x2, Performa 450

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, zombienerd said:

Sounds like a firewall issue on the server or your switch.  It's disallowing LAN IP's, but allowing WAN IP's.

 

 

But how, if I disabled firewall? lol I forgot to mention I tried it with disabled firewall too.

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, KieuVanQuan said:

But how, if I disabled firewall? lol

Which OS is the server running?  What version of Apache and MySQL?  Also, are you using a Dynamic DNS name, or just trying to connect via IP?

Main Rig:

Case: Lian Li Lancool Mesh RGB

CPU: Ryzen 5 3600 

Cooler: CoolerMaster MasterLiquid 240

MB: MSI B550 Gaming Pro Carbon 

Ram: Gskill DDR4 3600 x 32GB 

GPU: Asus Arez Strix Vega 64 OC

PS: Seasonic FOCUS Gold Plus Series SSR-750FX

SSD1: Crucial P1 1TB NVME

SSD2: Adata SU800 512gb M.2 Sata

HDD: Hitatchi 2tb 7200RPM + 3x 2TB WD Passport USB 3.0

Monitors: AOC C24G1

Keyboard: Cheap Blue Knockoff Mechanical

Mouse: Uhuru Gaming Mouse
OS: Pop! 21.04



Current Vintage Equipment:  Please ask me about it, I love to talk old tech!
IBM Thinkpad 390, IBM Aptiva A12, IBM PS/2 Model 25-004.  Compaq Contura 4/25C, Presario 7596
Asus P5A-B Socket 7 Box, Tandy 1000RLX-HD "B" & 1200-2FD, VIC20, Zenith ZFL-181-93, Packard Bell 300SX.

Apple II/gs, Mac Plus x2, Mac SE x2, Performa 450

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, zombienerd said:

Which OS is the server running?  What version of Apache and MySQL?  Also, are you using a Dynamic DNS name, or just trying to connect via IP?

It does not matter because my friend successfully connected to my apache and my MSSQL (same versions). 

My friend connects via IP. I use WIN7 X64 ULT now but I tried with WIN8.1 too, same errors.

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

Can anyone help? :(

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

Which IP are you trying to use to access your server?

The IP from your ISP or from your router?
You need to use the IP from your router/local IP, you cannot use the IP that you get from your ISP, because that would basically be a loopback and most ISPs do not allow this. That would be why others can connect to it but you cannot from the same network.

Meaning you have to use the 192.168.1.xxx address associated to the server(or whichever IP that your router gives to your networked devices) or 127.0.0.1 if the server is on the computer you are currently using. You might need to add the port used to the IP, but that shouldn't be the case.

CPU: AMD Ryzen 3700x / GPU: Asus Radeon RX 6750XT OC 12GB / RAM: Corsair Vengeance LPX 2x8GB DDR4-3200
MOBO: MSI B450m Gaming Plus / NVME: Corsair MP510 240GB / Case: TT Core v21 / PSU: Seasonic 750W / OS: Win 10 Pro

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, TetraSky said:

Which IP are you trying to use to access your server?

The IP from your ISP or from your router?
You need to use the IP from your router/local IP, you cannot use the IP that you get from your ISP, because that would basically be a loopback and most ISPs do not allow this. That would be why others can connect to it but you cannot from the same network.

Meaning you have to use the 192.168.1.xxx address associated to the server(or whichever IP that your router gives to your networked devices) or 127.0.0.1 if the server is on the computer you are currently using. You might need to add the port used to the IP, but that shouldn't be the case.

I'm trying to use my public ip to join (from my ISP)

 

Oh. So that's how it is. That kinda cleared this up.

 

But then there's an issue.

 

This server that I wanna host consists of several .exe files and several .inf files which are very important. And since I'm really clueless about networking I don't know what IP's I'm supposed to configure my server with.

 

 

Should I use my public ip in the server inf files or my local?

 

Sry I'm really dumb at this.

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, KieuVanQuan said:

It does not matter because my friend successfully connected to my apache and my MSSQL (same versions). 

My friend connects via IP. I use WIN7 X64 ULT now but I tried with WIN8.1 too, same errors.

I assure you the Server's OS (the box running Apache) and versions matter when it comes to troubleshooting.

56 minutes ago, KieuVanQuan said:

Can anyone help? :(

I tried, but you blew off my questions. 

 

Good luck, space pupper.

Main Rig:

Case: Lian Li Lancool Mesh RGB

CPU: Ryzen 5 3600 

Cooler: CoolerMaster MasterLiquid 240

MB: MSI B550 Gaming Pro Carbon 

Ram: Gskill DDR4 3600 x 32GB 

GPU: Asus Arez Strix Vega 64 OC

PS: Seasonic FOCUS Gold Plus Series SSR-750FX

SSD1: Crucial P1 1TB NVME

SSD2: Adata SU800 512gb M.2 Sata

HDD: Hitatchi 2tb 7200RPM + 3x 2TB WD Passport USB 3.0

Monitors: AOC C24G1

Keyboard: Cheap Blue Knockoff Mechanical

Mouse: Uhuru Gaming Mouse
OS: Pop! 21.04



Current Vintage Equipment:  Please ask me about it, I love to talk old tech!
IBM Thinkpad 390, IBM Aptiva A12, IBM PS/2 Model 25-004.  Compaq Contura 4/25C, Presario 7596
Asus P5A-B Socket 7 Box, Tandy 1000RLX-HD "B" & 1200-2FD, VIC20, Zenith ZFL-181-93, Packard Bell 300SX.

Apple II/gs, Mac Plus x2, Mac SE x2, Performa 450

Link to comment
Share on other sites

Link to post
Share on other sites

The ability to loopback on your WAN IP / Hostname, is dependant on your router, not your ISP. 

A lot of higher end routers like Drayteks, Microtik's, Asus, etc...have bind - as well as more advanced router firmware like Tomato or DD-WRT. 

Generally in your router firmware its called NAT Loopback.

 

If your router doesnt have it, and you don't want to get a new router, then if you're going to be using vhosts or want to be able to access it with a hostname, you'll need to edit your local computers hosts file. 

 

e.g in C:\Windows\system32\drivers\etc edit the hosts file like

mywebsite.local     192.168.1.123

 

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | EVGA GTX1070 FTW | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO | 12 x 8TB HGST Ultrastar He10 (WD Whitelabel) | 500GB Aorus Gen4 NVMe | 2 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Link to comment
Share on other sites

Link to post
Share on other sites

It's DNS, it's always DNS.

 

16 hours ago, Jarsky said:

f your router doesnt have it, and you don't want to get a new router, then if you're going to be using vhosts or want to be able to access it with a hostname, you'll need to edit your local computers hosts file. 

 

e.g in C:\Windows\system32\drivers\etc edit the hosts file like

mywebsite.local     192.168.1.123

 

^ This would be the easiest way of accessing it from your computer but it means you won't be able to access it from any other device unless you change the hosts file for them as well.

 

The best solution would be to et up a DNS server on your lan, have all your devices point to this which will resolve your website to an internal ip address and forwad everything else to an external DNS provider.

Link to comment
Share on other sites

Link to post
Share on other sites

18 hours ago, Jarsky said:

The ability to loopback on your WAN IP / Hostname, is dependant on your router, not your ISP. 

A lot of higher end routers like Drayteks, Microtik's, Asus, etc...have bind - as well as more advanced router firmware like Tomato or DD-WRT. 

Generally in your router firmware its called NAT Loopback.

 

If your router doesnt have it, and you don't want to get a new router, then if you're going to be using vhosts or want to be able to access it with a hostname, you'll need to edit your local computers hosts file. 

 

e.g in C:\Windows\system32\drivers\etc edit the hosts file like

mywebsite.local     192.168.1.123

 

You're the man. Thank you!

CPU i5-4460 @ 3.2 ghzMotherboard Gigabyte GA-Z97X Gaming 7RAM 32gb Corsair Vengance 1600mhzGPU GTX-750 TICase Carbide 400R | SSD Plextor M8Pe(Y) 256gb NVME | SSHD Barracuda 1TB PSU CX430Display LG 29UM55-P Ultrawide | Keyboard Trust 3-way LEDMouse Razer Death Adder V2 Left Handed | Speakers Genius SW-HF 5.1 6000Headset Beyerdynamic DT770 PRO | Sound Card Xonar Essence STXIIOS Windows 8.1 x64 Professional, build 9600 | Theme(s) Windows 7, Vista & Aero from DeviantArt

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/17/2017 at 3:46 PM, Jarsky said:

The ability to loopback on your WAN IP / Hostname, is dependant on your router, not your ISP. 

A lot of higher end routers like Drayteks, Microtik's, Asus, etc...have bind - as well as more advanced router firmware like Tomato or DD-WRT. 

Generally in your router firmware its called NAT Loopback.

 

If your router doesnt have it, and you don't want to get a new router, then if you're going to be using vhosts or want to be able to access it with a hostname, you'll need to edit your local computers hosts file. 

 

e.g in C:\Windows\system32\drivers\etc edit the hosts file like

mywebsite.local     192.168.1.123

 

I once spent 3hrs convinced something wasn't working on a network before I realized that it was the router just not doing loopback. :/  At least now it's my FIRST guess.  'Hrm, doesn't work on it's own IP?  Better check 127.0.0.1 first before I declare that the server doesn't work at ALL.'

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×