Ubuntu Desktop 16.04 LTS, running on Hyper-V on windows 10 pro x64 I have two wordpress sites, one is on port 80 with server_name directive pointing to root The other is running on port 8001. I don’t remember why I configured it this way but I’m ok with changing it. The problem seems to be that even though I have all the ports open I have to login to ubuntu before the firewall rule kicks in . My port 80 site works fine but the 8001 gives chrome a sad page icon until after the login.
[02/11/2017 12:25:50 AM] Status: Enabled [02/11/2017 12:25:37 AM] Status: Disabled [02/11/2017 12:25:20 AM] Status: Enabled [02/10/2017 07:35:52 AM] Appending new rules: ufw allow in 81 > Skipping adding existing rule | Skipping adding existing rule (v6) [02/10/2017 07:35:52 AM] Appending new rules: ufw allow in 8001 > Skipping adding existing rule | Skipping adding existing rule (v6) [02/10/2017 07:35:52 AM] Appending new rules: ufw allow in 81 > Rule added | Rule added (v6) [02/10/2017 07:35:52 AM] Appending new rules: ufw allow in 8001 > Rule added | Rule added (v6) [02/10/2017 07:35:52 AM] Deleting previous rules: 3 ufw --force delete 3 > Rule deleted [02/10/2017 07:35:52 AM] Deleting previous rules: 6 ufw --force delete 6 > Rule deleted (v6) [02/10/2017 07:35:51 AM] Status: Enabled [02/10/2017 07:35:50 AM] Changing profile: Public
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!
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.
What I would recommend doing, just to make sure we get the correct setup, is running
The above stops
ufwand then resets all rules. With a clean slate, we setup our default policies first.
With those rules in place, we then add the rules we need to work for whatever our purposes are. To start, I recommend allowing SSH in first.
We can then allow application-specific ports, such as 80, 443, 8001, etc. I’ll start with those three.
We could also run just one command (copy and paste directly)
Now, if you need to add any other ports, now’s the time to go ahead and add them. If nothing more needs to be added, we can then run
When prompted to confirm, type
y, hit enter, and
ufwis active once again.
The benefit to the above is outgoing connections are always allowed, though only the ports you define are permitted to connect (i.e. incoming).