Question

Connection Refused to my Website (only on my IP/Network, on browser only)

I was making minor content changes to my Wordpress website (standard Ubuntu 18.04 droplet WordPress setup), and suddenly all my requests from my browser to are refused. Apparently, this only occurs to devices connected to my home router. I can access correctly with 4G on my phone, and my friends can access the website in their homes.

I suspected it might be a DNS cache problem. But I can SSH into the droplet using my domain, through my home router, without any problems. I also tested that the domain resolves to the correct droplet IP address on my desktop machine.

This is really annoying since I cannot access my site directly. Does anybody have any ideas what the problem might be?

A possible related problem: https://www.digitalocean.com/community/questions/i-can-t-access-my-site-but-everyone-else-can-only-my-ip-address-doesn-t-work


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

I realized somehow my IP address was banned with fail2ban. It worked after removing all fail2ban bans.

KFSys
Site Moderator
Site Moderator badge
June 20, 2020

Hi @lichunshang,

This is quite strange! Firstly, I’ll recommend allowing your IP in your Firewall. You can achieve that by running the following commands

/sbin/iptables -A INPUT -p tcp -s XXX.XXX.XXX.XXX -j ACCEPT
/sbin/iptables -A OUTPUT -p tcp -d  XXX.XXX.XXX.XXX -j ACCEPT

Please remember to change XXX.XXX.XXX.XXX with your IP address. Next, make sure you are not the one blocking access to the said site. I’ve had cases before where the router/network/wi-fi a person is connected to is blocking some websites. This is common practice with some colleagues.

Lastly, check if you can open the website using an incognito browser, it might be some plugin you have installed that’s preventing you from seeing it.

Regards, KFSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel