Solved

iptables ubuntu BLOCK all

Posted on 2016-07-28
2
79 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now