Solved

iptables ubuntu BLOCK all

Posted on 2016-07-28
2
104 Views
Last Modified: 2016-07-29
If I comment the line pre-up iptables-restore < /etc/iptables.up.rules on /etc/network/interfaces my site works fine. If not everything is blocked.
The content of the file is (just for test)
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

What I´m doing wrong
0
Comment
Question by:Jose Bredariol
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
Zephyr ICT earned 500 total points
ID: 41734235
Hi, I'm not sure how well adept you are with iptables, but if you're looking for something easier to manage iptables you could opt for the UFW (uncomplicated Firewall) frontend to iptables.

A simple
sudo apt-get install ufw

Open in new window


Should install it.

Then add some default policies like:
    sudo ufw default deny incoming
    sudo ufw default allow outgoing

Open in new window


And some default connections:
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https

Open in new window


After this you can enable the firewall (make sure you have another session open or keep this one open and test if you can still access your server via ssh after enabling the firewall).

sudo ufw enable

Open in new window


Check the status of the firewall like so:

sudo ufw status

Open in new window

or
sudo ufw status verbose

Open in new window


These are the basics of course, but should get you going.
0
 

Author Closing Comment

by:Jose Bredariol
ID: 41734659
thanks a lot
0

Featured Post

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question