iptables question (kinda general firewall question)

Reply

Join Date: May 2009
Posts: 1
Reputation: gavriloprincep is an unknown quantity at this point 
Solved Threads: 0
gavriloprincep gavriloprincep is offline Offline
Newbie Poster

iptables question (kinda general firewall question)

 
0
  #1
May 4th, 2009
Hi

Could one of you kind people who know tell me - and other readers - if it is safe practice to let all local-host to local-host connections happen ? I know that most illicit connections happen through already open ports, but what is good practice ?

specifically, is it dangerous to do :

# tcp OUT table
iptables -A tcp_out -p tcp -d $LOCALHOST_IP -j ACCEPT

instead of :

#iptables -A tcp_out -p tcp -dport $MYSQL_PORT -d $LOCALHOST_IP -j ACCEPT
#iptables -A tcp_out -p tcp -dport $DICT_PORT -d $LOCALHOST_IP -j ACCEPT
#iptables -A tcp_out -p tcp -dport $XFS_PORT -d $LOCALHOST_IP -j ACCEPT
#iptables -A tcp_out -p udp -dport $XFS_PORT -d $LOCALHOST_IP -j ACCEPT
:
:



and likewise :

# tcp IN table
iptables -A tcp_in -p tcp -s $LOCALHOST_IP -j ACCEPT

instead of :

#iptables -A tcp_in -p tcp -sport $MYSQL_PORT -s $LOCALHOST_IP -j ACCEPT
#iptables -A tcp_in -p tcp -sport $DICT_PORT -s $LOCALHOST_IP -j ACCEPT
#iptables -A tcp_in -p tcp -sport $XFS_PORT -s $LOCALHOST_IP -j ACCEPT
:
:
:



and, just asking for completeness, what about :

iptables -A non_tcp_in -p icmp -s $LOCALHOST_IP -j ACCEPT
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 6
Reputation: ramyasowbhagya has a little shameless behaviour in the past 
Solved Threads: 0
ramyasowbhagya ramyasowbhagya is offline Offline
Newbie Poster

Re: iptables question (kinda general firewall question)

 
0
  #2
May 13th, 2009
hey u can allow the local host but make sure that they are from the inside n\w
because there are some cases that ip address is of inside hosts
but they come from outside n\w
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 11
Reputation: Darkflib is an unknown quantity at this point 
Solved Threads: 3
Darkflib Darkflib is offline Offline
Newbie Poster

Re: iptables question (kinda general firewall question)

 
0
  #3
May 14th, 2009
Use the local interface rather (or in addition to) than the localhost ip, since as stated above, packets can be spoofed from external hosts to look like they are from the loopback address.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Network Security Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC