Contents:
- 1 °³¿ä
- 2 °ü·Ã¼Àû
- 3 Áֿ丵ũ
- 4 Firewall
- 4.1 º»¹®
- 4.2 º»¹®
- 5 NAT ( Network Address Translation )
- 5.1 º»¹®
- 5.2 º»¹®
- 6 IP Forwarding
- 7 ´Ù¿î·Îµå
- 8 °ü·Ã¸µÅ©
5 NAT ( Network Address Translation ) #
³×Æ®¿öÅ©¿¡ ´ëÇÏ¿© Firewall À̳ª NAT ·Î µ¿ÀÛÇØ¾ß ÇÒ °æ¿ì IP Forwarding ÀÌ ÇÊ¿äÇÏ´Ù. ´ÙÀ½°ú °°ÀÌ 3 °¡Áö ¹æ¹ýÀ¸·Î IP Forwarding À» ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.
- echo ¸í·É
# echo 1 > /proc/sys/net/ipv4/ip_forward
- sysctl ¸í·É
# sysctl -w net.ipv4.ip_forward=1
- /etc/sysctl.conf ÆÄÀÏ
/etc/sysctl.conf ÆÄÀÏ¿¡¼ net.ipv4.ip_forward=1 ·Î ¼³Á¤ ÈÄ network ¸¦ Àç½ÃÀÛÇÑ´Ù.
# /etc/rc.d/init.d/network restart
7 Display iptables #
Firewall À̳ª NAT ¿¡ ¼³Á¤µÈ »çÇ×À» ´ÙÀ½°ú °°Àº ¿É¼ÇÀ¸·Î iptables À» ½ÇÇàÇϸé È®ÀÎÇÒ ¼ö ÀÖ´Ù.
- Display filter table ( default )
# iptables -L -nv
- Display nat table
# iptables -L -t nat -nv
¾Æ·¡´Â ¼³Á¤µÈ Rule À» º¸±â À§ÇÑ iptables ÀÇ ¿É¼ÇµéÀÌ´Ù.
| Option | Description |
| -L | List all rules in the selected chain. |
| -t | This option specifies the packet matching table which the command should operate on. |
| -n | Numeric output. |
| -v | Verbose output. |
8 ´Ù¿î·Îµå #