티스토리 뷰

Unix/Linux

iptables configuration for Samba

Jared 2008. 8. 28. 16:20
  1. Add the bolded text to /etc/sysconfig/iptables.
  2. Restart iptables service
  3. [root]# cat /etc/sysconfig/iptables
    # Generated by iptables-save v1.3.5 on Thu Aug 21 15:51:38 2008
    *filter
    :INPUT ACCEPT [9:1126]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [169:26842]
    :RH-Firewall-1-INPUT - [0:0]
    -A INPUT -j RH-Firewall-1-INPUT
    -A FORWARD -j RH-Firewall-1-INPUT
    -A RH-Firewall-1-INPUT -i lo -j ACCEPT
    -A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
    -A RH-Firewall-1-INPUT -p esp -j ACCEPT
    -A RH-Firewall-1-INPUT -p ah -j ACCEPT
    -A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
    -A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
    -A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8000 -j ACCEPT
    -A RH-Firewall-1-INPUT -p udp -m udp --dport 137 -j ACCEPT
    -A RH-Firewall-1-INPUT -p udp -m udp --dport 138 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 139 -j ACCEPT
    -A RH-Firewall-1-INPUT -p tcp -m tcp --dport 445 -j ACCEPT
    -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
    COMMIT
    # Completed on Thu Aug 21 15:51:38 2008
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2025/11   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
글 보관함