Advertisement

06.20.2008 at 03:33PM PDT, ID: 23503812
[x]
Attachment Details

Can you change this iptables command to append in iptables file?

Asked by jaisonshereen in Linux, Unix Operating Systems

iptables -A INPUT -i eth1 -p tcp --destination-port 25 -j REJECT
iptables -A INPUT -i eth1 -p tcp --destination-port 5432 -j REJECT
iptables -A INPUT -i eth1 -p tcp --destination-port 22 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --destination-port 80 -j ACCEPT
iptables -A INPUT -i eth1 -p tcp --destination-port 443 -j ACCEPT


Can you change this iptables command to append in iptables file?

My iptables file currently looks like this:


[root@server01 sysconfig]# cat iptables
# Generated by iptables-save v1.2.7a on Thu Dec  6 13:16:01 2007
*filter
:INPUT ACCEPT [8509664:1959985619]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [10341072:7773170711]
COMMIT
# Completed on Thu Dec  6 13:16:01 2007
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 22 -j DROP

[root@server01 sysconfig]# Start Free Trial
 
Loading Advertisement...
 
[+][-]06.20.2008 at 06:57PM PDT, ID: 21836028

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Unix Operating Systems
Sign Up Now!
Solution Provided By: omarfarid
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.21.2008 at 05:31AM PDT, ID: 21837361

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628