Solved

Debian 5.0 (lenny) & IP Tables

Posted on 2012-04-12
2
348 Views
Last Modified: 2012-04-19
i need to open port 80 for all public and private traffic on a Debian 5.0 (lenny) server.  Shorewall is installed but stopped.  How do i allow this traffic to pass?
0
Comment
Question by:deklinm
2 Comments
 
LVL 4

Accepted Solution

by:
FastSi earned 250 total points
ID: 37840620
Sorry trying to do this with IP Tables or Shorewall?

IP Tables

iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables-save
0
 
LVL 1

Assisted Solution

by:nmitev
nmitev earned 250 total points
ID: 37842803
If you enter
iptables -L -v -n

Open in new window

you will see the currently active rules relating to traffic filtering. An empty rule set looks like
Chain INPUT (policy ACCEPT 16 packets, 2067 bytes)
num   pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 8 packets, 1365 bytes)
num   pkts bytes target     prot opt in     out     source               destination         

Open in new window


If Shorewall is stopped then most likely the rule set in iptables will not be empty.

Adding the permissions with
iptables -A INPUT -p tcp --dport 80 -j ACCEPT

Open in new window

will work until the next reboot or restart of the networking service.
Making this rule persist can be done in many ways, but iptables-save will only dump the current rules to the terminal and will not actually save anything.

You can do iptables-save > /path-of-your-choice/filename-of-your-choice
and after a reboot iptables-restore < same path/file as above which is the manual solution.

You can try to locate the script doing the restore at boot time with
cd /etc
grep -r iptables-restore ./*

Open in new window

0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

8 Experts available now in Live!

Get 1:1 Help Now