Solved

Debian 5.0 (lenny) & IP Tables

Posted on 2012-04-12
2
363 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 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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,…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

738 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