Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

iptables ubuntu BLOCK all

Posted on 2016-07-28
2
Medium Priority
?
123 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 2000 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

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

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

If you are like regular user of computer nowadays, a good bet that your home computer is on right now, all exposed to world of Internet to be exploited by somebody you do not know and you never will. Internet security issues has been getting worse d…
Are you sitting there reading this and wondering how to get started with Linux? It almost seems like picking the right Linux distribution is about like picking the right college or buying a new car if you read some of the article out there. Relax… l…
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…
Suggested Courses

610 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