?
Solved

iptables ubuntu BLOCK all

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

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
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

777 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