Solved

Debian 5.0 (lenny) & IP Tables

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
People Counting Software 2 108
nagios remote hosts 9 42
linux redhat 7.2 10 30
VMware Workstation 12 Player 16 30
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

932 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

11 Experts available now in Live!

Get 1:1 Help Now