?
Solved

Debian 5.0 (lenny) & IP Tables

Posted on 2012-04-12
2
Medium Priority
?
370 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
[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 4

Accepted Solution

by:
FastSi earned 1000 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 1000 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

Stack Overflow Podcast - Developer Story

Welcome to the Stack Overflow podcast recorded Thursday July 20 at Stack Overflow Headquearters in NYC. Your hosts today are podcast regulars Jay Hanlon, David Fullerton, and Ilana Yitzhaki, plus the quite irregular Matt Sherman (Stack Overflow Engineering Manager extraordinaire)

Question has a verified solution.

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

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 16 hours left to enroll

770 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