2

I got a strange problem in my ubuntu server. For lots of time i have a ubuntu server in my own home with websites hosted. Now i can access my websites by 'example.com' or by my public ip address but only if i'm in another network. If im in the same network as the server and if i try to open my website by 'example.com' or by my public ip address i got "ERR_CONNECTION_REFUSED"

When i access 'example.com' or my public ip address using another network (like my phone network) i can get in...

I've never seen something like this, hope you guys can help me :))))

chcbl
  • 21
  • 1
  • Related: https://askubuntu.com/q/1232603 also check /etc/hosts.deny file and make sure your local network is not in the file as this will deny access from the network. You might also want to check any firewall/NAT/port forwarding present on your network. – Raffa May 13 '20 at 18:46
  • Without knowing more this sounds like a DNS issue. In order to access your webserver from your internal network your DNS provider will have to provide DNS resolution to your webserver's private IP address - 192.168.1.12. If you are managing your own internal DNS that's as simple as adding an A (and or CNAME) record to your internal DNS zone. If you are not managing your own internal DNS then you can achieve the same outcome via /etc/hosts.

    If you are managing your own internal DNS please let me know what DNS server let us know the type and I'll assist with the record entry.

    – sc608 May 13 '20 at 20:13
  • Thanks but it doesn't work yet :( – chcbl May 13 '20 at 20:37

1 Answers1

0

Thanks for your message Raffa!

Unfortunately it didn't solved my problem, or at least i didn't make things well.

i will explain whats my problem:

i have one ubuntu server connected to my router, on this server i have ssh, ftp, https, etc running.

i bought domains and i sucessfully pointed that domains to my server.

example: my domain: domain.com (is pointing to my server and when i try to connect it works, but only if i am using another internet connection, as example my phone 4g connection) my public ip address: 89.x.x.x (is also working but only if i connect from another network or using a vpn im my own network (own network means the same network i use in my pc and in the server) when i try to use the internal ip of the server: 192.168.1.12 it works.

So, it means that my server kind blocks is own external ip :o

Hope you got something to save me :)

chcbl
  • 21
  • 1