µé¾î¿À´Â PPP0 ¶ó¿ìÆÃ

µé¾î¿À´Â PPP0 ¶ó¿ìÆÃÀº NetFilter ¹æÈ­º®ÀÔ´Ï´Ù.
Áö±Ý ´Ù¿î·Îµå

µé¾î¿À´Â PPP0 ¶ó¿ìÆà ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • GPL
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • www.wtf.dk
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://www.linuxguruz.com/iptables/scripts/rc.firewall_020.txt

µé¾î¿À´Â PPP0 ¶ó¿ìÆà ű×


µé¾î¿À´Â PPP0 ¶ó¿ìÆà ¼³¸í

µé¾î¿À´Â PPP0 ¶ó¿ìÆÃÀº NetFilter ¹æÈ­º®ÀÔ´Ï´Ù. µé¾î¿À´Â PPP0 ¶ó¿ìÆÃÀº netfilter firewall.SampleÀÔ´Ï´Ù. #! / bin / baws #·Îµå Çʼö ¸ðµâ INSMOD INSMOD IP_TABLESSMOD IP_CONNTRACKINSMOD IPT_CONNTRACKINSMOD IPTABLE_MASQUERADE #Àº NAT Å×À̺í (-T NAT)¿¡¼­ NAT Å×À̺í (-TT NAT)¿¡¼­ ¸ðµç ±ÔÄ¢À» Ç÷¯½Ã, ±ÔÄ¢À» Ãß°¡ÇÕ´Ï´Ù. (-a) # masquerade ¿¬°á (-j °¡Àå ¹«µµÈ¸)¿¡ ´ëÇÑ ¸ðµç ÆÐŶ¿¡ ´ëÇÑ ¶ó¿ìÆà # (Æ÷½ºÆ® Æ÷½ºÆ®). # iptables -t nat -a post poptrouting -o ppp0 -j masquerade # ¾Æ·¡ '·çÆ® 192.168.1.x'iptables -t nat -a postouting -d! 192.168.1.0/24 -J °¡ÀåÀÚ¸® -A -A-S 192.168.1.0/24 -J acceptiptables -A Forward -D 192.168.1.0/24 -J acceptiptiptables -a ¾ÕÀ¸·Î -s! 192.168.1.0/24 -J µå·Ó # PPP0¿¡¼­ »õ·Ó°í À¯È¿ÇÏÁö ¾ÊÀº ¼ö½Å ¶Ç´Â Àü´Þ ÆÐŶÀ» Çã¿ëÇÏÁö ¾Ê½À´Ï´Ù. # iptables -a ÀÔ·Â -i ppp0 -m state -state new, invalid -j drop # iptables -a forward -i ppp0 -m »óÅ - »õ·Î¿î, ¹«È¿ÀÇ -J µå·Ó # Æ÷Æ® 113Àº ¾ÇÀÔ´Ï´Ù. # IP ForwardingEcho 1> / proc / sys / net / ipv4 / ip_forward # iptables -a ÀÔ·Â - ÇÁ·ÎÅäÄÝ UDP - ¿ø Æ÷Æ® 113 -j µå·Ó # Æ÷Æ® 80, 192.168.1.18:80iptables¿¡¼­ µé¾î¿À´Â PPP0 °æ·Î prerouting -t nat -p tcp -i ppp0 -dport 80 -j dnat --to 192.168.1.18:80# Æ÷Æ® 21¿¡¼­ 192.168.1.18:21iptables¿¡¼­ µé¾î¿À´Â PPP0 °æ·Î ÀÔ·Â - PrRerouting -t nat -p tcp - i ppp0 --dpt 21 -j dnat --to 192.168.1.18:21.


µé¾î¿À´Â PPP0 ¶ó¿ìÆà °ü·Ã ¼ÒÇÁÆ®¿þ¾î