{"id":893,"date":"2010-07-05T15:15:30","date_gmt":"2010-07-05T15:15:30","guid":{"rendered":"http:\/\/pchero21.com\/?p=893"},"modified":"2010-07-05T15:15:30","modified_gmt":"2010-07-05T15:15:30","slug":"8-psad%eb%a5%bc-%ec%9d%b4%ec%9a%a9%ed%95%9c-%eb%8a%a5%eb%8f%99%ec%a0%81-%ec%9d%91%eb%8b%b5","status":"publish","type":"post","link":"http:\/\/pchero21.com\/?p=893","title":{"rendered":"8.psad\ub97c \uc774\uc6a9\ud55c \ub2a5\ub3d9\uc801 \uc751\ub2f5"},"content":{"rendered":"<p>&nbsp;* \uce68\uc785 \ubc29\uc9c0\uc640 \ub2a5\ub3d9\uc801 \uc751\ub2f5<\/p>\n<p>&nbsp;\uc624\ub298\ub0a0 \ub098\uc640 \uc788\ub294 \ub2e4\uc591\ud55c \ubcf4\uc548 \uc81c\ud488, \uae30\uc220, \uc194\ub8e8\uc158\uc5d0\uc11c \uce68\uc785 \ud0d0\uc9c0\ub77c\ub294 \uc6a9\uc5b4\ub294 \ud070 \uc8fc\ubaa9\uc744 \ubc1b\uc544\uc654\ub2e4. \uc774\ub7ec\ud55c \uc8fc\ubaa9\uc758 \ub300\ub2e4\uc218\ub294 \uc774 \uc6a9\uc5b4\uac00 \uc8fc\ub294 \uc9c0\ub098\uce58\uac8c \uac15\ud55c \uc758\ubbf8\uc5d0\uc11c \ub098\uc628\uac83\uc73c\ub85c \ubcf4\uc778\ub2e4. \ubb3c\ub860 \ubcf4\uc548 \uce68\ubd80\ub97c \uc0ac\uc804\uc5d0 \ubc29\uc9c0\ud55c\ub2e4\ub294 \uac1c\ub150 \uc790\uccb4\uac00 \uc7a5\uc810\uc774 \uc5c6\ub2e4\ub294 \ub73b\uc740 \uc544\ub2c8\ub2e4. \ub2e4\ub9cc \uce68\uc785 \ud0d0\uc9c0 \uae30\uc220\uc740 \ud638\uc2a4\ud2b8 \uc218\uc900 \uc2a4\ud0dd \uac15\ud654 \uae30\ubc95(http:\/\/pax.grseurity.net \uc758 PaX \ud504\ub85c\uc81d\ud2b8 \ucc38\uc870)\uc5d0\uc11c\ubd80\ud130 \uc545\uc758\uc801\uc778 \ud328\ud0b7\uc774 \uc758\ub3c4\ub41c \ubaa9\ud45c\uc5d0 \ub3c4\ub2ec\ud558\uc9c0 \ubabb\ud558\uac8c \ubc29\uc9c0\ud558\ub294 \ub3d9\uc2dc\uc5d0 \ub2e4\ub978 \ud2b8\ub798\ud53d\uc740 \ubaa8\ub450 \ud1b5\uacfc\uc2dc\ud0ac \uc218 \uc788\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4\ub97c \uac16\ucd98 \uc778\ub77c\uc778 \ub124\ud2b8\uc6cc\ud06c \uc7a5\uce58\uae4c\uc9c0 \ub2e4\uc591\ud558\ub2e4.<\/p>\n<p>&nbsp;\uc774\uc640 \ub2ec\ub9ac \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc740 (\uacf5\uaca9\uc774 \ud0d0\uc9c0\ub41c \uacbd\uc6b0) \uacf5\uaca9\uc790\uc5d0\uac8c \ucde8\ud560 \uc218 \uc788\ub294 \uae30\ubc95\ub4e4\uc744 \ub9d0\ud558\uba70 \uc774\uac83\uc774 \uaf2d \uacf5\uaca9\uc744 \ubb34\ub825\ud654\ud558\ub294 \uae30\ubc95\ub9cc\uc744 \uc758\ubbf8\ud558\ub294 \uac83\uc740 \uc544\ub2c8\ub2e4. \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc774 \ud56d\uc0c1 \ucd08\uae30 \uacf5\uaca9\uc744 \ub9c9\uc744 \uc218 \uc5c6\ub2e4\ub294 \uc0ac\uc2e4\uc774 \uc911\uc694\ud55c \ucc28\uc774\uba70, \uc774\uac83\uc774 \uce68\uc785 \ubc29\uc9c0\uc640 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uac04\uc758 \ucc28\uc774\uc810\uc744 \uba85\ud655\ud788 \uc11c\uc220\ud574\uc900\ub2e4.<\/p>\n<p>&nbsp;* \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc758 \ud2b8\ub808\uc774\ub4dc\uc624\ud504<\/p>\n<p>&nbsp;\uc138\uc158 \ud30c\uad34(session-busting) \ud2b8\ub798\ud53d\uc744 \uc0dd\uc131\ud558\uac70\ub098 \ubc29\ud654\ubcbd \uc815\ucc45\uc744 \uc218\uc815\ud574\uc11c \uacf5\uaca9\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc751\ub2f5\ud558\ub294 \uac83\uc5d0\ub294 \uacb0\uacfc\uac00 \ub530\ub978\ub2e4. \uacf5\uaca9\uc790\ub294 \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uacfc\uc758 TCP \uc138\uc158\uc774 \uc885\ub8cc\ub418\ub294 \uc911\uc774\ub77c\uac70\ub098 \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uacfc\uc758 \ubaa8\ub4e0 \uc5f0\uacb0\uc774 \ub04a\uc5b4\uc84c\ub2e4\ub294 \uac83\uc744 \uc7ac\ube68\ub9ac \uc54c\uc544\ucc4c \uc218 \uc788\ub2e4. \uc774\ub85c\ubd80\ud130 \uc774\ub04c\uc5b4 \ub0bc \uc218 \uc788\ub294 \uac00\uc7a5 \ub17c\ub9ac\uc801\uc778 \uacb0\ub860\uc740 \ud2b9\uc815 \uc720\ud615\uc758 \ub2a5\ub3d9\uc801 \uc751\ub2f5\uae30\ubc95\uc774 \ubaa9\ud45c\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \uc124\uce58\ub410\ub2e4\ub294 \uac83\uc774\ub2e4. \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uc2dc\uc2a4\ud15c\uc774 \ud3ec\ud2b8 \uc2a4\uce94\uc774\ub098 \ud3ec\ud2b8 \uc2a4\uc715\uacfc \uac19\uc774 \uc0c1\ub300\uc801\uc73c\ub85c \uc545\uc758\uac00 \uc5c6\ub294 \ud2b8\ub798\ud53d\uc5d0 \uc751\ub2f5\ud558\uac8c \uc124\uc815\ub410\ub2e4\uba74 \uacf5\uaca9\uc790\uac00 \uc751\ub2f5 \uae30\ubc95\uc744 \ub0a8\uc6a9\ud574\uc11c \uc774\uac83\uc774 \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uc5d0 \ubc18\ud558\uac8c \ubc14\uafb8\ub294 \uac83\uc740 \ub9e4\uc6b0 \uc26c\uc6cc\uc9c4\ub2e4. \uc774\ub294 \ubaa9\ud45c\uc640\uc758 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \ud544\uc694\ub85c \ud558\uc9c0 \uc54a\ub294 \ubc29\uc2dd\uc73c\ub85c \uc804\ub2ec\ub420 \uc218 \uc788\ub294 \uc545\uc758\uc801\uc778 \ud2b8\ub798\ud53d(\uc989, \uacf5\uaca9\uc774 \uc2a4\ud478\ud551\ub420 \uc218 \uc788\ub294 \uacbd\uc6b0)\uc5d0\ub3c4 \uc801\uc6a9\ub418\uba70 \uc704\ud2f0 \uc6dc\uc774 \ubc14\ub85c \uadf8 \uc608\ub2e4.<\/p>\n<p>&nbsp;&#8211; \uacf5\uaca9\uc758 \uc885\ub958<br \/>&nbsp;\ub2a5\ub3d9\uc801\uc778 \uc751\ub2f5 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\ub294 \ub9ce\uc740 \uc18c\ud504\ud2b8\uc6e8\uc5b4(psad \ud3ec\ud568)\uac00 \ud2b9\uc815 \ud638\uc2a4\ud2b8\ub098 \ub124\ud2b8\uc6cc\ud06c\ub97c \ud5c8\uc6a9 \ub9ac\uc2a4\ud2b8(whitelist)\uc5d0 \ucd94\uac00\ud558\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4. \uc774\ub294 \uacf5\uaca9\uc790\uac00 \ud5c8\uc6a9 \ub9ac\uc2a4\ud2b8\uc5d0 \uc18d\ud55c \ub124\ud2b8\uc6cc\ud06c\ub85c\ubd80\ud130 \ud3ec\ud2b8 \uc2a4\uce94\uc774\ub098 \uae30\ud0c0 \uc545\uc758\uc801\uc778 \ud2b8\ub798\ud53d\uc744 \uc2a4\ud478\ud551\ud558\ub354\ub77c\ub3c4 \uc751\ub2f5 \uae30\ubc95\uc774 \uc544\ubb34\ub7f0 \uc870\uce58\ub97c \ucde8\ud558\uc9c0 \uc54a\uac8c \ud558\uae30 \uc704\ud568\uc774\ub2e4. \uadf8\ub7ec\ub098 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uad00\ub9ac\uc790\uac00 \uc774 \ubaa9\ub85d\uc5d0 \uc911\uc694\ud55c \uc2dc\uc2a4\ud15c\uc744 \ubaa8\ub450 \ud3ec\ud568\uc2dc\ud0a4\uc9c0 \uc54a\uc744 \uc218 \uc788\uc73c\ubbc0\ub85c \uacf5\uaca9\uc790\ub294 \uc790\uc2e0\uc758 \ucc3d\uc758\ub825\uc5d0 \ub530\ub77c \uacf5\uaca9\uc744 \uc1a1\uacf5\ud560 \uc218 \uc788\ub2e4. \uc2ec\uc9c0\uc5b4 TCP \uc720\ud734 \uc2a4\uce94\uc870\ucc28 \uc62c\ubc14\ub85c \ub3d9\uc791\ud558\ub824\uba74 \uc2a4\uce94\uc774 \uc2a4\ud478\ud551\ub3fc\uc57c \ud55c\ub2e4.<\/p>\n<p>&nbsp;\uacf5\uaca9\uc5d0 \uc751\ub2f5\ud558\ub294 \uc880 \ub354 \ub098\uc740 \uc804\ub7b5\uc740 \uacf5\uaca9\uc790\uc640 \ubaa9\ud45c \uc0ac\uc774\uc5d0 \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \ud544\uc694\ub85c\ud558\ub294 \uacf5\uaca9\uc5d0\ub9cc \uc751\ub2f5\ud558\uac8c \uc751\ub2f5 \uae30\ubc95\uc744 \ud65c\uc131\ud654\ud558\ub294 \uac83\uc774\ub2e4. \uc774\ub294 \uc77c\ubc18\uc801\uc73c\ub85c \uacf5\uaca9\uc790\uac00 TCP \uc5f0\uacb0\uc744 \uc218\ub9bd\ud588\uace0 \uacf5\uaca9(\uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \ub300\ud55c SQL \uc778\uc81d\uc158 \uacf5\uaca9\uc774\ub098 TCP \ud3ec\ud2b8\uc5d0\uc11c \ub300\uae30\uc911\uc778 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c \ubc84\ud37c \uc624\ubc84\ud50c\ub85c\uc6b0 \ucde8\uc57d\uc810\uc744 \ud1b5\ud574 \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uc774 \uc258 \ucf54\ub4dc\ub97c \uc2e4\ud589\ud558\uac8c \uac15\uc81c\ud558\ub824\ub294 \uc2dc\ub3c4)\uc744 \uc804\ub2ec\ud558\ub294 \ub370 \uc218\ub9bd\ud55c TCP \uc5f0\uacb0\uc744 \uc0ac\uc6a9 \uc911\uc774\ub77c\ub294 \uac83\uc744 \uc758\ubbf8\ud55c\ub2e4.<\/p>\n<p>&nbsp;\uc218\ub9bd\ub41c TCP \uc5f0\uacb0\uc5d0\uc11c \uacf5\uaca9\uc744 \ud0d0\uc9c0\ud558\ub824\uba74 \ud0d0\uc9c0 \uc2dc\uc2a4\ud15c\uc774 \uc218\ub9bd\ub41c \uc5f0\uacb0\uc5d0 \ub300\ud55c \ud45c\ub97c \uc720\uc9c0\ud558\uba74\uc11c \uc774\ubbf8 \uc218\ub9bd\ub41c \uc5f0\uacb0\ub4e4 \ub0b4\uc5d0\uc11c \uacf5\uaca9\uc744 \ucc3e\uc544\uc57c \ud55c\ub2e4. \uc2e4\uc81c\ucc98\ub7fc \ubcf4\uc774\ub294 \uc21c\uc11c \ubc88\ud638\uc640 \uc2b9\uc778 \ubc88\ud638\ub97c \uac00\uc9c0\ub294 TCP \ud328\ud0b7\ub3c4 \uacb0\uad6d \uc2a4\ud478\ud551\ub420 \uc218 \uc788\uc9c0\ub9cc \uc774\ub7f0 \ud328\ud0b7\uc740 \uc2e4\uc81c\ub85c \uc218\ub9bd\ub41c \uc5f0\uacb0\uc758 \uc77c\ubd80\uac00 \uc544\ub2c8\uba70 \uc2a4\ud478\ud551 \uc131\uacf5 \uc5ec\ubd80\ub294 \uc774\ub97c \uacb0\uc815\ud558\ub294 \ud0d0\uc9c0 \uae30\ubc95\uc5d0 \ub2ec\ub824\uc788\ub2e4.<\/p>\n<p>&nbsp;&#8211; \uae0d\uc815\uc624\ub958<br \/>&nbsp;\uce68\uc785 \ud0d0\uc9c0 \uc2dc\uc2a4\ud15c\uc740 \uc5b4\ub5a4 \uac83\uc774\ub4e0 \ubaa8\ub450 \uae0d\uc815 \uc624\ub958(\uc815\uc0c1\uc801\uc778 \ud65c\ub3d9\uc744 \uc545\uc758\uc801\uc778 \uac83\uc73c\ub85c \uc798\ubabb \ud310\ub2e8\ud558\ub294 \uacbd\uace0)\ub97c \uc0dd\uc131\ud558\uae30\ub3c4 \ud55c\ub2e4. \ubd80\uc815 \uc624\ub958\ub098 \uc2e4\uc81c \uc545\uc758\uc801\uc778 \ud2b8\ub798\ud53d\uc774 \uc874\uc7ac\ud560 \ub300 \uc774\ubca4\ud2b8\ub97c \uc0dd\uc131\ud558\uc9c0 \ubabb\ud558\ub294 \uac83 \uc5ed\uc2dc \uc0c1\ub300\uc801\uc73c\ub85c \ud754\ud55c \uc77c\uc774\ub2e4.<\/p>\n<p>&nbsp;psad\ub3c4 \uc774 \uaddc\uce59\uc5d0 \uc608\uc678\uac00 \uc544\ub2c8\uba70 psad\ub97c \uc2e4\ud589\ud558\ub2e4 \ubcf4\uba74 \uc815\uc0c1\uc801\uc778 \ud2b8\ub798\ud53d\uc5d0 \ub300\ud574 \uc774\ubca4\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \uacbd\uc6b0\ub97c \ubcfc \uc218 \uc788\ub2e4. \uae0d\uc815 \uc624\ub958\ub294 \uc8fc\uc758 \uae4a\uac8c \uc124\uc815\ud574\uc11c \ucd5c\uc18c\ud654\ud560 \uc218 \uc788\uc9c0\ub9cc \uc644\uc804\ud788 \uc81c\uac70\ud560 \uc218\ub294 \uc5c6\ub2e4. \uadf8\ub7ec\ubbc0\ub85c \uc545\uc758\uc801\uc774\ub77c\uace0 \uc798\ubabb \ud310\ub2e8\ub41c \ud2b8\ub798\ud53d\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc751\ub2f5\ud558\ub294 \uac83\uc740 \uc77c\ubc18\uc801\uc778 \ub124\ud2b8\uc6cc\ud06c \uc5f0\uacb0\uc131\uc744 \uc720\uc9c0\ud558\ub294 \ub370 \uc88b\uc9c0 \uc54a\ub2e4.<\/p>\n<p>&nbsp;\uadf8\ub7fc\uc5d0\ub3c4 \uc5ec\uc804\ud788 \ub9ce\uc740 \ubcf4\uc548 \uad00\ub9ac\uc790\uac00 \uc5b4\ub5a4 \uc720\ud615\uc758 \uc774\ubca4\ud2b8\ub294 \uadf8\uac83\uc774 \uc798\ubabb \uc2dd\ubcc4\ub41c \ud65c\ub3d9\uc73c\ub85c\ubd80\ud130 \uc0dd\uc131\ub41c \uac83\uc774\ub77c \ud560\uc9c0\ub77c\ub3c4 \uc5c4\uaca9\ud558\uac8c \uc751\ub2f5\ud560 \ub9cc\ud07c \ucda9\ubd84\ud788 \uc7a0\uc7ac\uc801\uc73c\ub85c \uc704\ud5d8\ud558\ub2e4\uace0 \ud310\ub2e8\ud55c\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \uc0c8\ub85c\uc6b4 \uc6dc\uc758 \ucd9c\ud604\uc774 \ub124\ud2b8\uc6cc\ud06c\uc640 \uad6c\uc131 \uc2dc\uc2a4\ud15c\uc744 \uc644\uc804\ud788 \ubb34\ub825\ud654\ud560 \uc218 \uc788\uc73c\ubbc0\ub85c \uc774\ub7f0 \uc6dc\uc5d0 \uac10\uc5f4\ub420 \uac00\ub2a5\uc131\uc774 \uc874\uc7ac\ud558\ub294 \ud55c \ud53c\ud574\ub97c \ucd5c\uc18c\ud654\ud558\ub294 \uc2dc\ub3c4\ub85c \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;* psad\ub97c \uc774\uc6a9\ud574 \uacf5\uaca9\uc5d0 \uc751\ub2f5\ud558\uae30<br \/>&nbsp;psad\uac00 \uacf5\uaca9\uc5d0 \uc751\ub2f5\ud558\ub294\ub370 \uc0ac\uc6a9\ud558\ub294 \uc8fc\uc694 \ubc29\ubc95\uc740 \uc124\uc815 \uac00\ub2a5\ud55c \uc2dc\uac04 \ub3d9\uc548 \uacf5\uaca9\uc790\uc758 \ucd9c\ubc1c\uc9c0 IP \uc8fc\uc18c\ub85c\ubd80\ud130\uc758 \ubaa8\ub4e0 \uc811\uc18d\uc744 \ucc28\ub2e8\ud558\uac8c \ub85c\uceec \ud544\ud130\ub9c1 \uc815\ucc45\uc744 \ub3d9\uc801\uc73c\ub85c \uc7ac\uc124\uc815\ud558\ub294 \uac83\uc774\ub2e4.<\/p>\n<blockquote><p>&nbsp;Tcpwrappers \uc5d0 \ub300\ud55c \ub178\ud2b8<br \/>&nbsp;psad\ub3c4 tcpwrappers \uac00 \uacf5\uaca9\uc790\uc758 \ucd9c\ubc1c\uc9c0 IP \uc8fc\uc18c\ub85c\ubd80\ud130\uc758 \uc811\uadfc\uc744 \ubd80\uc778\ud558\uac8c \/etc\/hosts.deny \ud30c\uc77c\uc744 \uc7ac\uc124\uc815\ud560 \uc218\ub3c4 \uc788\ub2e4. \uadf8\ub7ec\ub098 \uc774 \uae30\ubc95\uc740 \uba87 \uac00\uc9c0 \uc774\uc720\uc5d0\uc11c iptables\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\ubcf4\ub2e4 \uc548 \uc88b\ub2e4. \uc6b0\uc120 tcpwrappers \ub294 tcpwrappers \ub97c \uc0ac\uc6a9\ud558\uac8c \uc124\uc815\ub41c \ub370\ubaac\uc73c\ub85c\uc758 \uc811\uadfc\ub9cc \ucc28\ub2e8\ud560 \uc218 \uc788\ub2e4. \uc774\uc640 \ub2ec\ub9ac iptables \uc758 \uc77c\ubc18\uc801\uc778 \ucc28\ub2e8 \uaddc\uce59\uc740 \uacf5\uaca9\uc790\uac00 \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uc758 IP \uc2a4\ud0dd\uc744 \ud1b5\ud55c \ud1b5\uc2e0\uc744 \uc804\ud600 \uc218\ud589\ud560 \uc218 \uc5c6\uac8c \ud55c\ub2e4. \ub458\uc9f8\ub85c, tcpwrappers \ub294 \ub85c\uceec \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc2e4\ud589 \uc911\uc778 \ub370\ubaac\uc744 \ubcf4\ud638\ud558\ub294 \ub370\uc5d0\ub9cc \ud6a8\uacfc\uc801\uc778 \ubc18\uba74 psad\ub294 FORWARD \uccb4\uc778\uc758 \uc2a4\uce94\uc774\ub098 \uae30\ud0c0 \uc545\uc758\uc801\uc778 \ud2b8\ub798\ud53d\ub3c4 \ud0d0\uc9c0\ud560 \uc218 \uc788\ub2e4. \ub05d\uc73c\ub85c tcpwrappers \ub85c \ub370\ubaac\uc744 \ubcf4\ud638\ud558\ub294 \uacbd\uc6b0 \uacf5\uaca9\uc790\ub294 iptables\uc640 \uc5f0\ub3d9\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\ubcf4\ub2e4 \ud6e8\uc52c \ub354 \ub9ce\uc740 \ubc29\ubc95\uc73c\ub85c \ubaa9\ud45c \uc2dc\uc2a4\ud15c\uacfc \uc5f0\ub3d9\ud560 \uc218 \uc788\uc73c\uba70, \uc774 \uc911\uc5d0\uc11c \uc5b4\ub5a4 \uac83(\ucee4\ub110\uacfc \uc0ac\uc6a9\uc790 \uacf5\uac04 \uc911 \uc5b4\ub514\uc5d0 \uc788\ub294 \uac83\uc774\ub4e0)\uc774\ub77c\ub3c4 \ubcf4\uc548 \ucde8\uc57d\uc810\uc744 \uac00\uc9c8 \uac00\ub2a5\uc131\uc774 \uc874\uc7ac\ud55c\ub2e4.<\/p><\/blockquote>\n<p> \ub85c\uceec iptables \uc815\ucc45\uc744 \ub3d9\uc801\uc73c\ub85c \uc7ac\uc124\uc815\ud558\ub294 \uae30\ub2a5\uc740 \uc751\ub2f5\uc774 \ub124\ud2b8\uc6cc\ud06c \uacc4\uce35\uc5d0\uc11c \uc77c\uc5b4\ub09c\ub2e4\ub294 \uac83\uc744 \uc758\ubbf8\ud55c\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \uacf5\uaca9\uc790\uc758 IP \uc8fc\uc18c\ub294 IP \uc2a4\ud0dd\uc744 \ud1b5\ud55c \ud1b5\uc2e0\uc744 \ubabb\ud558\uac8c \ucc28\ub2e8\ub41c\ub2e4. \ucc28\ub2e8 \uaddc\uce59\uc774 \uc778\uc2a4\ud134\uc2a4\ud654\ub420 \ub54c \uacf5\uaca9\uc790\uac00 \ub85c\uceec \ub124\ud2b8\uc6cc\ud06c\uc758 \uc11c\ubc84 \uc911 \ud558\ub098\uc640 \uc218\ub9bd\ub41c TCP \uc138\uc158\uc744 \uac00\uc9c0\uace0 \uc788\ub2e4\uba74 (\ucc28\ub2e8 \uaddc\uce59\uacfc \ud568\uaed8 \uc0dd\uc131\ub41c TCP \uc7ac\uc124\uc815\uc774 \uc5c6\uae30 \ub54c\ubb38\uc5d0) \ubaa8\ub4e0 TCP \ud328\ud0b7\uc740 \ubc84\ub824\uc9c8 \uac83\uc774\uba70, \ub9d0\ub2e8 TCP \uc2a4\ud0dd\uc740 \uc2dc\uac04 \ub9cc\ub8cc \ub54c\uae4c\uc9c0 \uc7ac\uc804\uc1a1\uc744 \uc2dc\ub3c4\ud560 \uac83\uc774\ub2e4.<\/p>\n<p>&nbsp;** \uae30\ub2a5<\/p>\n<p>&nbsp;psad\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uae30\ub2a5\uc744 \uc9c0\uc6d0\ud55c\ub2e4.<\/p>\n<p>&nbsp;&#8211; iptables \ucc28\ub2e8 \uaddc\uce59\uc774 \ucd94\uac00\ub418\uae30 \uc804\uc5d0 \uacf5\uaca9\uc790\uac00 \ub3c4\ub2ec\ud574\uc57c \ud558\ub294 \uc0ac\uc6a9\uc790 \uc124\uc815 \uac00\ub2a5 \ucd5c\uc18c \uc704\ud5d8 \uc218\uc900<br \/>&nbsp;&#8211; \uc124\uc815 \uac00\ub2a5\ud55c \uc2dc\uac04 \ub9cc\ub8cc\uc5d0 \uae30\ubc18\ud574\uc11c \uc601\uc18d\uc801\uc774\uac70\ub098 \uc77c\uc2dc\uc801\uc778 \ucc28\ub2e8 \uaddc\uce59\uc744 \uc0dd\uc131\ud558\ub294 \uae30\ub2a5<br \/>&nbsp;&#8211; \uae30\uc874\uc758 \ub85c\uceec \uc2dc\uc2a4\ud15c iptables \uc815\ucc44\uace0\uac00 \ucda9\ub3cc\ud558\uc9c0 \uc54a\uac8c \ubaa8\ub4e0 \ucc28\ub2e8 \uaddc\uce59\uc5d0 \ubcc4\ub3c4\uc758 iptables \uccb4\uc778\uc744 \uc0ac\uc6a9\ud558\ub294 \uae30\ub2a5<br \/>&nbsp;&#8211; psad\ub098 \uc2dc\uc2a4\ud15c \uc7ac\uc2dc\uc791 \uc0ac\uc774\uc5d0\ub3c4 \ucc28\ub2e8 \uaddc\uce59\uc744 \ubcf4\uc874\ud558\ub294 \uae30\ub2a5(\uc774 \uae30\ub2a5\uc740 \uc124\uc815 \uac00\ub2a5\ud558\uc9c0\ub9cc \uae30\ubcf8 \uc124\uc815\uc740 psad\uac00 \uc2dc\uc791\ud560 \ub54c \uae30\uc874\uc758 \ucc28\ub2e8 \uaddc\uce59\uc744 \ubaa8\ub450 \ubc84\ub9ac\ub294 \uac83)<br \/>&nbsp;&#8211; \ud604\uc7ac \ucc28\ub2e8\ub41c \ubaa8\ub4e0 IP \uc8fc\uc18c\uc758 \uc0c1\ud0dc \ucd9c\ub825\uc744 \uad00\ub828 iptables \ucc28\ub2e8 \uaddc\uce59\uc774 \uc81c\uac70\ub420 \ub54c\uae4c\uc9c0 \ub0a8\uc740 \ucd08\uc640 \ud568\uaed8 \ud3ec\ud568\ud558\ub294 \uae30\ub2a5<br \/>&nbsp;&#8211; \uc678\ubd80 \ud504\ub85c\uc138\uc2a4\uac00 &#8211;fw-block-ip \uc640 &#8211;fw-rm-block-ip \uba85\ub839 \ud589 \uc778\uc790\ub97c \uc0ac\uc6a9\ud574\uc11c psad\uc5d0\uac8c \ud2b9\uc815 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc744 \ucd94\uac00\ud558\uac70\ub098 \uc81c\uac70\ud558\uac8c \uc9c0\uc2dc\ud560 \uc218 \uc788\ub294 \uae30\ub2a5<br \/>&nbsp;&#8211; psad \ucc28\ub2e8 \uccb4\uc778\uc5d0\uc11c IP \uc8fc\uc18c\uac00 \ucd94\uac00\ub418\uac70\ub098 \uc0ad\uc81c\ub420 \ub54c \uba54\uc77c\ub85c \ud1b5\uc9c0\ud558\ub294 \uae30\ub2a5<\/p>\n<p>&nbsp;** \uc124\uc815 \ubcc0\uc218<br \/>&nbsp;psad\uac00 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \ubaa8\ub4dc\uc5d0 \uc9c4\uc785\ud560\uc9c0 \uc5ec\ubd80\ub97c \uacb0\uc815\ud558\ub294 \uac00\uc7a5 \uc911\uc694\ud55c \ubcc0\uc218\ub294 ENABLE_AUTO_IDS \ub85c \/etc\/psad\/psad.conf \ud30c\uc77c\uc5d0\uc11c Y\uc774\ub098 N\uc73c\ub85c \uc124\uc815\ud560 \uc218 \uc788\ub2e4. \uc774 \uae30\ub2a5\uc774 \ud65c\uc131\ud654\ub418\uba74 \ub2e4\ub978 \uc77c\ubd80 \ubcc0\uc218\ub294 psad\uac00 \uacf5\uaca9\uc790\ub97c \uc790\ub3d9\uc73c\ub85c \ucc28\ub2e8\ud558\ub824\uace0 \ud560 \ub54c psad\uc758 \ub2e4\uc591\ud55c \ub3d9\uc791\uc744 \uc81c\uc5b4\ud55c\ub2e4.<\/p>\n<p>&nbsp;AUTO_IDS_DANGER_LEVEL \ubcc0\uc218\ub294 \ucc28\ub2e8 \uaddc\uce59\uc774 \uc778\uc2a4\ud134\uc2a4\ud654\ub418\uae30 \uc804\uc5d0 IP \uc8fc\uc18c\uac00 \ub3c4\ub2ec\ud574\uc57c \ud560 \ucd5c\uc18c \uc704\ud5d8 \uc218\uc900\uc5d0 \ub300\ud574 1 ~ 5 \uc758 \uc784\uacc4\uce58\ub97c \uc124\uc815\ud55c\ub2e4. \ud3ec\ud2b8 \uc2a4\uce94 \uc784\ub3a8\uce58, \uac1c\ubcc4\uc801\uc778 \uc11c\uba85 \uc704\ud5d8 \uc218\uc900(\/etc\/psad\/signatures \ucc38\uc870), \uc790\ub3d9 \uc704\ud5d8 \uc218\uc900 \ud560\ub2f9(\/etc\/psad\/auto_dl \ucc38\uc870)\uc744 \uc870\uc808\ud568\uc73c\ub85c\uc368 psad\ub294 IP \uc8fc\uc18c\ub97c \uc790\ub3d9\uc73c\ub85c \ucc28\ub2e8\ud560\uc9c0\uc5d0 \ub300\ud574 \uc138\ubc00\ud55c \uacb0\uc815\uc744 \ub0b4\ub9b4 \uc218 \uc788\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \ud2b9\uc815 IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c(\uc608\ub97c \ub4e4\uc5b4 192.168.1.0\/24)\uac00 \uacfc\uac70\uc758 \uc2a4\uce94\uc774\ub098 \uce68\uc785 \uc2dc\ub3c4\ub85c \uc778\ud574 \uacf5\uaca9\uc790\ub85c \uc54c\ub824\uc838 \uc788\ub2e4\uba74 \/etc\/psad\/auto_dl \ud30c\uc77c\uc5d0 \ub2e4\uc74c\uc744 \ucd94\uac00\ud574\uc11c \uc774 \uc8fc\uc18c\uc640\uc758 \ud1b5\uc2e0\uc744 \uc5b5\uc81c\ud55c \uc0c1\ud0dc\ub85c \uc720\uc9c0\ud560 \uc218 \uc788\ub2e4<\/p>\n<blockquote><p>&nbsp;192.168.1.0\/24 &nbsp; &nbsp; 5;<\/p><\/blockquote>\n<p> \uc774\uc81c 192.168.1.0\/24 \ud074\ub798\uc2a4 C \ub124\ud2b8\uc6cc\ud06c\uc5d0 \uc18d\ud558\ub294 \ubaa8\ub4e0 IP \uc8fc\uc18c\ub294 AUTO_IDS_DANGER_LEVEL\uc774 \uc5bc\ub9c8\ub098 \ub192\uac8c \uc124\uc815\ub410\ub294\uc9c0\uc640 \ubb34\uad00\ud558\uac8c \ud544\ud130\ub9c1 \uc815\ucc45\uc5d0 \uc704\ubc30\ub418\uba70 \uc774 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc774 \ucd94\uac00\ub41c\ub2e4.<\/p>\n<p>&nbsp;\uc77c\ubc18\uc801\uc778 \uc0c1\ud669\uc5d0\uc11c iptables\ub294 \uc911\uc694\ud55c \uc11c\ube44\uc2a4\ub85c\uc758 \uc801\ubc95\ud55c \ud2b8\ub798\ud53d(\uc608\ub97c \ub4e4\uba74 DNS)\uc744 \uae30\ub85d\ud558\uc9c0 \uc54a\uac8c \uc124\uc815\ub418\ubbc0\ub85c iptables\uac00 \ud328\ud0b7\uc744 \uae30\ub85d\ud558\uac8c \uc720\ubc1c\ud558\uc9c0 \uc54a\ub294 \ud55c 192.168.1.0\/24 \ub124\ud2b8\uc6cc\ud06c \ub0b4\uc758 \ubaa8\ub4e0 IP \uc8fc\uc18c\ub294 \uc774\ub7f0 \uc11c\ube44\uc2a4\uc5d0 \uc811\uadfc\ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;AUTO_BLOCK_TIMEOUT \ubcc0\uc218\ub294 iptables \ucc28\ub2e8 \uaddc\uce59\uc774 \uc720\ud6a8\ud55c \uc2dc\uac04\uc744 \ucd08\ub85c \uc815\uc758\ud55c\ub2e4. \uae30\ubcf8\uac12\uc740 360\ucd08, \uc989 \ud55c\uc2dc\uac04\uc774\ub2e4. AUTO_BLOCK_TIMEOUT\uc744 0\uc73c\ub85c \uc124\uc815\ud558\uba74 \ubaa8\ub4e0 \ucc28\ub2e8 \uaddc\uce59\uc774 \uc601\uc18d\uc801\uc73c\ub85c \uc720\uc9c0\ub418\uba70 FLUSH_IPT_AT_INIT \uac00 \ube44\ud65c\uc131\ud654\ub3fc \uc788\uc9c0 \uc54a\ub294 \ud55c psad\uac00 \uc7ac\uc2dc\uc791\ub418\uac70\ub098 \uc2dc\uc2a4\ud15c\uc774 \uc7ac\ubd80\ud305\ub420 \ub54c\ub9cc \uc81c\uac70\ub41c\ub2e4.<\/p>\n<p>&nbsp;IPTABLES_BLOCK_METHOD\uc640 TCPWRAPPERS_BLOCK_METHOD \ubcc0\uc218\ub294 psad\uac00 \uacf5\uaca9 IP \uc8fc\uc18c\ub97c \ucc28\ub2e8\ud558\uae30 \uc704\ud574 iptables\ub098 tcpwrappers\ub97c \uc0ac\uc6a9\ud560\uc9c0 \uc5ec\ubd80\ub97c \uc81c\uc5b4\ud55c\ub2e4. psad\ub97c \uacf5\uaca9\uc5d0 \uc751\ub2f5\ud558\uac8c \uc124\uc815\ud588\ub2e4\uba74 \ucd94\ucc9c \uc124\uc815\uc740 iptables \ucc28\ub2e8\uc744 \ud65c\uc131\ud654\ud558\ub294 \uac83\uc774\ub2e4.<\/p>\n<p>&nbsp;ENABLE_AUTO_IDS_REGEX\uc640 AUTO_BLOCK_REGEX \ubcc0\uc218\ub97c \uc0ac\uc6a9\ud558\uba74 \ub85c\uae45 \uc811\ub450\uc5b4\uac00 \ud2b9\uc815 \uc815\uaddc\uc2dd\uacfc \ub9e4\uce6d\ub418\ub294\uc9c0 \uc5ec\ubd80\uc640 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc758 \ucd94\uac00 \ub3d9\uc791\uc744 \uacb0\ud569\ud560 \uc218 \uc788\ub2e4. \uc774\ub294 \uc218\ub9bd\ub41c TCP \uc138\uc158\uc744 \ud1b5\ud55c \uc591\ubc29\ud5a5 \ud1b5\uc2e0\uc744 \ud544\uc694\ub85c \ud558\ub294 \uacf5\uaca9\uc744 \uac10\uc2dc\ud55c \uacbd\uc6b0\uc758 IP \uc8fc\uc18c \ucc28\ub2e8\uc5d0\ub9cc \uac00\uc7a5 \uc720\uc6a9\ud558\ub2e4. \ud3ec\ud2b8 \uc2a4\uce94\uc740 \uc27d\uac8c \uc2a4\ud478\ud551\ub418\uae30 \ub54c\ubb38\uc5d0 \uc774 \uae30\ub2a5\uc740 \uacf5\uaca9\uc790\uc5d0 \uc758\ud574 \ub2e8\uc21c\ud788 \uc2a4\ud478\ud551\ub418\uc9c0 \uc54a\uc740 IP \uc8fc\uc18c\ub4e4\ub85c \ucc28\ub2e8 \uaddc\uce59\uc744 \uc81c\ud55c\ud558\ub294 \uac15\ub825\ud55c \uae30\ubc95\uc744 \uc81c\uacf5\ud55c\ub2e4.<\/p>\n<p>&nbsp;\ub05d\uc73c\ub85c \uacf5\uaca9\uc790\ub97c \uc790\ub3d9\uc73c\ub85c \ucc28\ub2e8\ud558\ub294 \ub370 \uc911\uc694\ud55c \ub098\uba38\uc9c0 \uc124\uc815 \ubcc0\uc218\ub294 iptables \uaddc\uce59\uc774 \uc0dd\uc131\ub418\ub294 \ubc29\uc2dd\uc744 \uc81c\uc5b4\ud55c\ub2e4. \uc774\ub7ec\ud55c \ubcc0\uc218\ub294 \ubaa8\ub450 IPT_AUTO_CHAIN \ubb38\uc790\uc5f4\ub85c \uc2dc\uc791\ud558\uba70 \uadf8 \ub4a4\uc5d0 \uc815\uc218\uac00 \ub098\uc628\ub2e4(DANGER_LEVEL{n} \ubcc0\uc218\uc640 \ub9c8\ucc2c\uac00\uc9c0\ub2e4). \uc774 \ubcc0\uc218\ub4e4\uc740 psad\uac00 iptables\uc5d0 \uaddc\uce59\uc744 \ucd94\uac00\ud558\ub294 \ubc29\uc2dd\uc5d0 7\uac00\uc9c0\uc758 \uae30\uc900\uc744 \uba85\uc2dc\ud55c\ub2e4.<\/p>\n<p>&nbsp;&#8211; \uaddc\uce59\uc5d0 \ub300\ud55c iptables \ud0c0\uac9f(\uc608\ub97c \ub4e4\uc5b4 DROP)<br \/>&nbsp;&#8211; \uaddc\uce59\uc744 \ucd9c\ubc1c\uc9c0\ub098 \ubaa9\uc801\uc9c0(\ub610\ub294 \ub458 \ubaa8\ub450)\uc5d0 \uc801\uc6a9\ud560\uc9c0 \uc5ec\ubd80<br \/>&nbsp;&#8211; \uaddc\uce59\uc774 \ucd94\uac00\ub418\ub294 \ud14c\uc774\ube14(\uc608\ub97c \ub4e4\uc5b4 filter \ud14c\uc774\ube14)<br \/>&nbsp;&#8211; \ub9de\ucda4\ud654 psad \uccb4\uc778\uc744 \uc704\ud574 \uac74\ub108\ub6f0\uae30 \uaddc\uce59\uc774 \ucd94\uac00\ub420 iptables \uccb4\uc778<br \/>&nbsp;&#8211; iptables \uccb4\uc778 \ub0b4\uc5d0\uc11c \uac74\ub108\ub6f0\uae30 \uaddc\uce59\uc774 \ucd94\uac00\ub420 \uc704\uce58<br \/>&nbsp;&#8211; \ub9de\ucda4\ud654 psad \uccb4\uc778\uc758 \uc774\ub984<br \/>&nbsp;&#8211; \ub9de\ucda4\ud654 psad \uccb4\uc778 \ub0b4\uc5d0\uc11c \uc0c8\ub85c\uc6b4 \uaddc\uce59\uc774 \ucd94\uac00\ub420 \uc704\uce58<\/p>\n<p>&nbsp;psad\ub294 \ucc28\ub2e8 \uaddc\uce59 \uc790\uccb4\ubfd0\ub9cc \uc544\ub2c8\ub77c \ub9de\ucda4\ud654 psad \uccb4\uc778\uacfc \uac74\ub108\ub6f0\uae30 \uaddc\uce59\uc758 \uc0dd\uc131\uacfc \uc720\uc9c0\ub3c4 \uad00\ub9ac\ud55c\ub2e4.<\/p>\n<p>&nbsp;\uae30\ubcf8 IPT_AUTO_CHAIN{n} \ubcc0\uc218\ub294 psad\uac00 AUTO_IDS_DANGER_LEVEL \uc784\uacc4\uce58\uc5d0 \ub3c4\ub2ec\ud55c IP \uc8fc\uc18c\uc5d0 \ub300\ud574 \ucd1d \ub124 \uac1c\uc758 \ucc28\ub2e8 \uaddc\uce59\uc744 \ucd94\uac00\ud558\uac8c \ud55c\ub2e4.<\/p>\n<p>&nbsp;&#8211; \ud328\ud0b7\uc774 PSAD_BLOCK_INPUT \uccb4\uc778\uc73c\ub85c \uac74\ub108\ub6f0\uac8c \uac15\uc81c\ud574\uc11c \ub85c\uceec \uc2dc\uc2a4\ud15c\uc774 \ubaa9\uc801\uc9c0\uc778 \uacf5\uaca9\uc790\ub85c\ubd80\ud130\uc758 \ud328\ud0b7\uc774 \ub85c\uceec \uc18c\ucf13\uacfc \ud1b5\uc2e0\ud560 \uc218 \uc5c6\uac8c \uacf5\uaca9 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c DROP \uaddc\uce59\uc744 PSAD_BLOCK_INPUT \uccb4\uc778\uc5d0 \ucd94\uac00<\/p>\n<p>&nbsp;&#8211; \ub85c\uceec \uc2dc\uc2a4\ud15c\uc5d0\uc11c \uc2dc\uc791\ub41c \ud328\ud0b7\uc774 \uacf5\uaca9\uc790\uc5d0\uac8c \uc804\uc1a1\ub420 \uc218 \uc5c6\uac8c PSAD_BLOCK_OUTPUT \uccb4\uc778\uc5d0 \uacf5\uaca9 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c DROP \uaddc\uce59 \ucd94\uac00<\/p>\n<p>&nbsp;&#8211; \uacf5\uaca9 IP \uc8fc\uc18c\uc5d0\uc11c \uc2dc\uc791\ub410\uac70\ub098 \uacf5\uaca9 IP \uc8fc\uc18c\ub85c \uc804\uc1a1\ub418\ub294 \ud328\ud0b7\uc744 \uc81c\ud55c\ud558\ub294 \uacf5\uaca9 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \ub450 \uac1c\uc758 DROP \uaddc\uce59\uc744 PSAD_BLOCK_FORWARD \uccb4\uc778\uc5d0 \ucd94\uac00. iptables \ubc29\ud654\ubcbd\uc774 \uc774\ub7f0 \uc2dd\uc73c\ub85c \ub0b4\ubd80 \ub124\ud2b8\uc6cc\ud06c\uc758 \uc2dc\uc2a4\ud15c\uc744 \ubcf4\ud638\ud558\uba74 \uc5b4\ub5a4 \uacf5\uaca9\uc790\ub3c4 \ud574\ub2f9 \uc2dc\uc2a4\ud15c\uacfc \uc5f0\uacb0\ud560 \uc218 \uc5c6\ub2e4.<\/p>\n<p>&nbsp;* \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc758 \uc608<\/p>\n<p>&nbsp;\ub2e4\uc74c\uc740 \ud544\uc790\uac00 \uc0ac\uc6a9\ud558\ub294 psad.conf \ud30c\uc77c\uc758 \ub0b4\uc6a9\uc774\ub2e4.<\/p>\n<blockquote><p>#<br \/>##############################################################################<br \/>#<br \/>#&nbsp; This is the configuration file for psad (the Port Scan Attack Detector).<br \/>#&nbsp; Normally this file gets installed at \/etc\/psad\/psad.conf, but can be put<br \/>#&nbsp; anywhere in the filesystem and then the path can be specified on the<br \/>#&nbsp; command line argument &#8220;-c &lt;file&gt;&#8221; to psad.&nbsp; All three psad daemons (psad,<br \/>#&nbsp; kmsgsd, and psadwatchd) reference this config file.<br \/>#<br \/>#&nbsp; Each line has the form&nbsp; &#8220;&lt;variable name&gt; &nbsp;&nbsp; &lt;value&gt;;&#8221;.&nbsp; Note the semi-<br \/>#&nbsp; colon after the &lt;value&gt;.&nbsp; All characters after the semicolon will be<br \/>#&nbsp; ignored to provide space for comments.<br \/>#<br \/>##############################################################################<br \/>#<br \/># $Id: psad.conf 2179 2008-06-07 15:21:55Z mbr $<br \/>#<\/p>\n<p>### Supports multiple email addresses (as a comma separated<br \/>### list).<br \/>EMAIL_ADDRESSES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root@localhost;<\/p>\n<p>### Machine hostname<br \/>HOSTNAME &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; extreme;<\/p>\n<p>### Specify the home and external networks.&nbsp; Note that by default the<br \/>### ENABLE_INTF_LOCAL_NETS is enabled, so psad automatically detects<br \/>### all of the directly connected subnets and uses this information as<br \/>#@@ the HOME_NET variable.<br \/>HOME_NET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; any;<br \/>EXTERNAL_NET &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; any;<\/p>\n<p>### The FW_SEARCH_ALL variable controls has psad will parse iptables<br \/>### messages.&nbsp; If it is set to &#8220;Y&#8221; then psad will parse all iptables<br \/>### messages for evidence of scan activity.&nbsp; If it is set to &#8220;N&#8221; then<br \/>### psad will only parse those iptables messages that contain logging<br \/>### prefixes specified by the FW_MSG_SEARCH variable below.&nbsp; Logging<br \/>### prefixes are set with the &#8211;log-prefix command line option to iptables.<br \/>### Setting FW_SEARCH_ALL to &#8220;N&#8221; is useful for having psad only analyze<br \/>### iptables messages that are logged out of a specific iptables chain<br \/>### (multiple strings can be searched for, see the comment above the<br \/>### FW_MSG_SEARCH variable below) or a specific logging rule for example.<br \/>### FW_SEARCH_ALL is set to &#8220;Y&#8221; by default since usually people want psad<br \/>### to parse all iptables messages.<br \/>FW_SEARCH_ALL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### The FW_MSG_SEARCH variable can be modified to look for logging messages<br \/>### that are specific to your firewall configuration (specified by the<br \/>### &#8220;&#8211;log-prefix&#8221; option.&nbsp; For example, if your firewall uses the<br \/>### string &#8220;Audit&#8221; for packets that have been blocked, then you could<br \/>### set FW_MSG_SEARCH to &#8220;Audit&#8221;;&nbsp; The default string to search for is<br \/>### &#8220;DROP&#8221;.&nbsp; Both psad and kmsgsd reference this file.&nbsp; NOTE: You can<br \/>### specify this variable multiple times to have psad search for multiple<br \/>### strings.&nbsp; For example to have psad search for the strings &#8220;Audit&#8221; and<br \/>### &#8220;Reject&#8221;, you would use the following two lines:<br \/>#FW_MSG_SEARCH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Audit;<br \/>#FW_MSG_SEARCH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REJECT;<br \/>FW_MSG_SEARCH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DROP;<\/p>\n<p>### Set the type of syslog daemon that is used.&nbsp; The SYSLOG_DAEMON<br \/>### variable accepts four possible values: syslogd, syslog-ng, ulogd,<br \/>### or metalog.<br \/>SYSLOG_DAEMON &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; syslogd;<\/p>\n<p>### Danger levels.&nbsp; These represent the total number of<br \/>### packets required for a scan to reach each danger level.<br \/>### A scan may also reach a danger level if the scan trips<br \/>### a signature or if the scanning ip is listed in<br \/>### auto_ips so a danger level is automatically<br \/>### assigned.<br \/>DANGER_LEVEL1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 5; &nbsp;&nbsp; ### Number of packets.<br \/>DANGER_LEVEL2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15;<br \/>DANGER_LEVEL3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 150;<br \/>DANGER_LEVEL4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1500;<br \/>DANGER_LEVEL5 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10000;<\/p>\n<p>### Set the interval (in seconds) psad will use to sleep before<br \/>### checking for new iptables log messages<br \/>CHECK_INTERVAL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 5;<\/p>\n<p>### Search for snort &#8220;sid&#8221; values generated by fwsnort<br \/>### or snort2iptables<br \/>SNORT_SID_STR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SID;<\/p>\n<p>### Set the minimum range of ports that must be scanned before<br \/>### psad will send an alert.&nbsp; The default is 1 so that at<br \/>### least two port must be scanned (p2-p1 &gt;= 1).&nbsp; This can be set<br \/>### to 0 if you want psad to be extra paranoid, or 30000 if not.<br \/>PORT_RANGE_SCAN_THRESHOLD &nbsp; 1;<\/p>\n<p>### If &#8220;Y&#8221;, means that scans will never timeout.&nbsp; This is useful<br \/>### for catching scans that take place over long periods of time<br \/>### where the attacker is trying to slip beneath the IDS thresholds.<br \/>ENABLE_PERSISTENCE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Y;<\/p>\n<p>### This is used only if ENABLE_PERSISTENCE = &#8220;N&#8221;;<br \/>SCAN_TIMEOUT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 3600;&nbsp; ### seconds<\/p>\n<p>### If &#8220;Y&#8221;, means all signatures will be shown since<br \/>### the scan started instead of just the current ones.<br \/>SHOW_ALL_SIGNATURES &nbsp; &nbsp; &nbsp; &nbsp; N;<\/p>\n<p>### Allow reporting methods to be enabled\/restricted.&nbsp; This keyword can<br \/>### accept values of &#8220;nosyslog&#8221; (don&#8217;t write any messages to syslog),<br \/>### &#8220;noemail&#8221; (don&#8217;t send any email messages), or &#8220;ALL&#8221; (to generate both<br \/>### syslog and email messages).&nbsp; &#8220;ALL&#8221; is the default.&nbsp; Both &#8220;nosyslog&#8221;<br \/>### and &#8220;noemail&#8221; can be combined with a comma to disable all logging<br \/>### and alerting.<br \/>ALERTING_METHODS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; ALL;<\/p>\n<p>### By default, psad acquires iptables log data from the \/var\/log\/psad\/fwdata<br \/>### file which is written to by kmsgsd.&nbsp; However, psad can just read an<br \/>### existing file that syslog writes iptables log data to (commonly<br \/>### \/var\/log\/messages).&nbsp; On some systems, having syslog communicate log data<br \/>### to kmsgsd can be problematic (syslog configs and external factors such<br \/>### as Apparmor and SELinux can play a role here), so using this feature can<br \/>### simplify a psad deployment.<br \/>ENABLE_SYSLOG_FILE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; N;<br \/>IPT_WRITE_FWDATA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Y;<br \/>IPT_SYSLOG_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/var\/log\/messages;<\/p>\n<p>### When enabled, this instructs psad to write the &#8220;msg&#8221; field<br \/>### associated with Snort rule matches to syslog.<br \/>ENABLE_SIG_MSG_SYSLOG &nbsp; &nbsp; &nbsp; Y;<br \/>SIG_MSG_SYSLOG_THRESHOLD &nbsp;&nbsp; 10;<br \/>SIG_SID_SYSLOG_THRESHOLD &nbsp;&nbsp; 10;<\/p>\n<p>### TTL values are decremented depending on the number of hops<br \/>### the packet has taken before it hits the firewall.&nbsp; We will<br \/>### assume packets will not jump through more than 20 hops on<br \/>### average.<br \/>MAX_HOPS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 20;<\/p>\n<p>### Do not include any timestamp included within kernel logging<br \/>### messages (Ubuntu systems commonly have this)<br \/>IGNORE_KERNEL_TIMESTAMP &nbsp; &nbsp; Y;<\/p>\n<p>### FIXME: try to mitigate the affects of the iptables connection<br \/>### tracking bug by ignoring tcp packets that have the ack bit set.<br \/>### Read the &#8220;BUGS&#8221; section of the psad man page.&nbsp; Note that<br \/>### if a packet matches a snort SID generated by fwsnort (see<br \/>### http:\/\/www.cipherdyne.org\/fwsnort\/)<br \/>### then psad will see it even if the ack bit is set.&nbsp; See the<br \/>### SNORT_SID_STR variable.<br \/>IGNORE_CONNTRACK_BUG_PKTS &nbsp; Y;<\/p>\n<p>### define a set of ports to ignore (this is useful particularly<br \/>### for port knocking applications since the knock sequence will<br \/>### look to psad like a scan).&nbsp; This variable may be defined as<br \/>### a comma-separated list of port numbers or port ranges and<br \/>### corresponding protocol,&nbsp; For example, to have psad ignore all<br \/>### tcp in the range 61000-61356 and udp ports 53 and 5000, use:<br \/>### IGNORE_PORTS &nbsp; &nbsp; &nbsp;&nbsp; tcp\/61000-61356, udp\/53, udp\/5000;<br \/>IGNORE_PORTS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; NONE;<\/p>\n<p>### allow entire protocols to be ignored.&nbsp; This keyword can accept<br \/>### a comma separated list of protocols.&nbsp; Each protocol must match<br \/>### the protocol that is specified in a Netfilter log message (case<br \/>### insensitively, so both &#8220;TCP&#8221; or &#8220;tcp&#8221; is ok).<br \/>### IGNORE_PROTOCOL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tcp,udp;<br \/>IGNORE_PROTOCOLS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; NONE;<\/p>\n<p>### allow packets to be ignored based on interface (this is the<br \/>### &#8220;IN&#8221; interface in Nefilter logging messages).<br \/>IGNORE_INTERFACES &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NONE;<\/p>\n<p>### Ignore these specific logging prefixes<br \/>IGNORE_LOG_PREFIXES &nbsp; &nbsp; &nbsp; &nbsp; NONE;<\/p>\n<p>### Minimum danger level a scan must reach before any logging or<br \/>### alerting is done.&nbsp; The EMAIL_ALERT_DANGER_LEVEL variable below<br \/>### only refers to email alerts; the MIN_DANGER_LEVEL variable<br \/>### applies to everything from email alerts to whether or not the<br \/>### IP directory is created within \/var\/log\/psad\/.&nbsp; Hence<br \/>### MIN_DANGER_LEVEL should be set less than or equal to the value<br \/>### assigned to the EMAIL_ALERT_DANGER_LEVEL variable.<br \/>MIN_DANGER_LEVEL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 1;<\/p>\n<p>### Only send email alert if danger level &gt;= to this value.<br \/>EMAIL_ALERT_DANGER_LEVEL &nbsp;&nbsp; 1;<\/p>\n<p>### Treat all subnets on local interfaces as part of HOME_NET (this<br \/>### means that these networks do not have to be manually defined)<br \/>ENABLE_INTF_LOCAL_NETS &nbsp; &nbsp;&nbsp; Y;<\/p>\n<p>### Include MAC addresses in email alert<br \/>ENABLE_MAC_ADDR_REPORTING &nbsp; N;<\/p>\n<p>### Look for the Netfilter logging rule (fwcheck_psad is executed)<br \/>ENABLE_FW_LOGGING_CHECK &nbsp; &nbsp; Y;<\/p>\n<p>### Send no more than this number of emails for a single<br \/>### scanning source IP.&nbsp; Note that enabling this feature may cause<br \/>### alerts for real attacks to not be generated if an attack is sent<br \/>### after the email threshold has been reached for an IP address.<br \/>### This is why the default is set to &#8220;0&#8221;.<br \/>EMAIL_LIMIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0;<\/p>\n<p>### By default, psad maintains a counter for each scanning source address,<br \/>### but by enabling this variable psad will maintain email counters for<br \/>### each victim address that is scanned as well.<br \/>ENABLE_EMAIL_LIMIT_PER_DST&nbsp; N;<\/p>\n<p>### If &#8220;Y&#8221;, send a status email message when an IP has reached the<br \/>### EMAIL_LIMIT threshold.<br \/>EMAIL_LIMIT_STATUS_MSG &nbsp; &nbsp;&nbsp; Y;<\/p>\n<p>### If &#8220;Y&#8221;, send email for all newly logged packets from the same<br \/>### source ip instead of just when a danger level increases.<br \/>ALERT_ALL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### If &#8220;Y&#8221;, then psad will import old scan source ip directories<br \/>### as current scans instead of moving the directories into the<br \/>### archive directory.<br \/>IMPORT_OLD_SCANS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; Y;<\/p>\n<p>### syslog facility and priority (the defaults are usually ok)<br \/>### The SYSLOG_FACILITY variable can be set to one of LOG_LOCAL{0-7}, and<br \/>### SYSLOG_PRIORITY can be set to one of LOG_INFO, LOG_DEBUG, LOG_NOTICE,<br \/>### LOG_WARNING, LOG_ERR, LOG_CRIT, LOG_ALERT, or LOG_EMERG<br \/>SYSLOG_IDENTITY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; psad;<br \/>SYSLOG_FACILITY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG_LOCAL7;<br \/>SYSLOG_PRIORITY &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LOG_INFO;<\/p>\n<p>### Port thresholds for logging and -S and -A output.<br \/>TOP_PORTS_LOG_THRESHOLD &nbsp; &nbsp; 500;<br \/>STATUS_PORTS_THRESHOLD &nbsp; &nbsp;&nbsp; 20;<\/p>\n<p>### Signature thresholds for logging and -S and -A output.<br \/>TOP_SIGS_LOG_THRESHOLD &nbsp; &nbsp;&nbsp; 500;<br \/>STATUS_SIGS_THRESHOLD &nbsp; &nbsp; &nbsp; 50;<\/p>\n<p>### Attackers thresholds for logging and -S and -A output.<br \/>TOP_IP_LOG_THRESHOLD &nbsp; &nbsp; &nbsp;&nbsp; 500;<br \/>STATUS_IP_THRESHOLD &nbsp; &nbsp; &nbsp; &nbsp; 25;<\/p>\n<p>### Specify how often to log the TOP_* information (i.e. how many<br \/>### CHECK_INTERVAL iterations before the data is logged again).<br \/>TOP_SCANS_CTR_THRESHOLD &nbsp; &nbsp; 1;<\/p>\n<p>### Send scan logs to dshield.org.&nbsp; This is disabled by default,<br \/>### but is a good idea to enable it (subject to your site security<br \/>### policy) since the DShield service helps to track the bad guys.<br \/>### For more information visit http:\/\/www.dshield.org<br \/>ENABLE_DSHIELD_ALERTS &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### dshield.org alert email address; this should not be changed<br \/>### unless the guys at DShield have changed it.<br \/>DSHIELD_ALERT_EMAIL &nbsp; &nbsp; &nbsp; &nbsp; reports@dshield.org;<\/p>\n<p>### Time interval (hours) to send email alerts to dshield.org.<br \/>### The default is 6 hours, and cannot be less than 1 hour or<br \/>### more than 24 hours.<br \/>DSHIELD_ALERT_INTERVAL &nbsp; &nbsp;&nbsp; 6;&nbsp; ### hours<\/p>\n<p>### If you have a DShield user id you can set it here.&nbsp; The<br \/>### default is &#8220;0&#8221;.<br \/>DSHIELD_USER_ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 0;<\/p>\n<p>### If you want the outbound DShield email to appear as though it<br \/>### is coming from a particular user address then set it here.<br \/>DSHIELD_USER_EMAIL &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; NONE;<\/p>\n<p>### Threshold danger level for DShield data; a scan must reach this<br \/>### danger level before associated packets will be included in an<br \/>### alert to DShield.&nbsp; Note that zero is the default since this<br \/>### will allow DShield to apply its own logic to determine what<br \/>### constitutes a scan (_all_ iptables log messages will be included<br \/>### in DShield email alerts).<br \/>DSHIELD_DL_THRESHOLD &nbsp; &nbsp; &nbsp;&nbsp; 0;<\/p>\n<p>### List of servers.&nbsp; Fwsnort supports the same variable resolution as<br \/>#### Snort.<br \/>HTTP_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $HOME_NET;<br \/>SMTP_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $HOME_NET;<br \/>DNS_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $HOME_NET;<br \/>SQL_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $HOME_NET;<br \/>TELNET_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $HOME_NET;<\/p>\n<p>#### AOL AIM server nets<br \/>AIM_SERVERS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [64.12.24.0\/24, 64.12.25.0\/24, 64.12.26.14\/24, 64.12.28.0\/24, 64.12.29.0\/24, 64.12.161.0\/24, 64.12.163.0\/24, 205.188.5.0\/24, 205.188.9.0\/24];<\/p>\n<p>### Configurable port numbers<br \/>HTTP_PORTS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 80;<br \/>SHELLCODE_PORTS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !80;<br \/>ORACLE_PORTS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 1521;<\/p>\n<p>### If this is enabled, then psad will die if a rule in the<br \/>### \/etc\/psad\/signatures file contains an unsupported option (otherwise<br \/>### a syslog warning will be generated).<br \/>ENABLE_SNORT_SIG_STRICT &nbsp; &nbsp; Y;<\/p>\n<p>### If &#8220;Y&#8221;, enable automated IDS response (auto manages<br \/>### firewall rulesets).<br \/>ENABLE_AUTO_IDS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### Block all traffic from offending IP if danger<br \/>### level &gt;= to this value<br \/>AUTO_IDS_DANGER_LEVEL &nbsp; &nbsp; &nbsp; 5;<\/p>\n<p>### Set the auto-blocked timeout in seconds (the default<br \/>### is one hour).<br \/>#AUTO_BLOCK_TIMEOUT &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 36000;<br \/>AUTO_BLOCK_TIMEOUT &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; 360;<\/p>\n<p>### Enable regex checking on log prefixes for active response<br \/>ENABLE_AUTO_IDS_REGEX &nbsp; &nbsp; &nbsp; N;<\/p>\n<p>### Only block if the Netfilter log message matches the following regex<br \/>AUTO_BLOCK_REGEX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; ESTAB;&nbsp; ### from fwsnort logging prefixes<\/p>\n<p>### Control whether &#8220;renew&#8221; auto-block emails get sent.&nbsp; This is disabled<br \/>### by default because lots of IPs could have been blocked, and psad<br \/>### should not generate a renew email for each of them.<br \/>ENABLE_RENEW_BLOCK_EMAILS &nbsp; N;<\/p>\n<p>### By setting this variable to N, all auto-blocking emails can be<br \/>### suppressed.<br \/>ENABLE_AUTO_IDS_EMAILS &nbsp; &nbsp;&nbsp; Y;<\/p>\n<p>### Enable iptables blocking (only gets enabled if<br \/>### ENABLE_AUTO_IDS is also set)<br \/>IPTABLES_BLOCK_METHOD &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### Specify chain names to which iptables blocking rules will be<br \/>### added with the IPT_AUTO_CHAIN{n} keyword.&nbsp; There is no limit on the<br \/>### number of IPT_AUTO_CHAIN{n} keywords; just increment the {n} number<br \/>### to add an additional IPT_AUTO_CHAIN requirement. The format for this<br \/>### variable is: &lt;Target&gt;,&lt;Direction&gt;,&lt;Table&gt;,&lt;From_chain&gt;,&lt;Jump_rule_position&gt;, <br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &lt;To_chain&gt;,&lt;Rule_position&gt;.<br \/>### &#8220;Target&#8221;: Can be any legitimate Netfilter target, but should usually<br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; just be &#8220;DROP&#8221;.<br \/>### &#8220;Direction&#8221;: Can be &#8220;src&#8221;, &#8220;dst&#8221;, or &#8220;both&#8221;, which correspond to the<br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; INPUT, OUTPUT, and FORWARD chains.<br \/>### &#8220;Table&#8221;: Can be any Netfilter table, but the default is &#8220;filter&#8221;.<br \/>### &#8220;From_chain&#8221;: Is the chain from which packets will be jumped.<br \/>### &#8220;Jump_rule_position&#8221;: Defines the position within the From_chain where<br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the jump rule is added.<br \/>### &#8220;To_chain&#8221;: Is the chain to which packets will be jumped. This is the<br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; main chain where psad rules are added.<br \/>### &#8220;Rule_position&#8221;: Defines the position where rule are added within the<br \/>### &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; To_chain.<br \/>###<br \/>### The following defaults make sense for most installations, but note<br \/>### it is possible to include blocking rules in, say, the &#8220;nat&#8221; table<br \/>### using this functionality as well.&nbsp; The following three lines provide<br \/>### usage examples:<br \/>#IPT_AUTO_CHAIN1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; DROP, src, filter, INPUT, 1, PSAD_BLOCK_INPUT, 1;<br \/>#IPT_AUTO_CHAIN2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; DROP, dst, filter, OUTPUT, 1, PSAD_BLOCK_OUTPUT, 1;<br \/>#IPT_AUTO_CHAIN3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; DROP, both, filter, FORWARD, 1, PSAD_BLOCK_FORWARD, 1;<br \/>IPT_AUTO_CHAIN1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DROP, src, filter, INPUT, 1, PSAD_BLOCK_INPUT, 1;<br \/>IPT_AUTO_CHAIN2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DROP, dst, filter, OUTPUT, 1, PSAD_BLOCK_OUTPUT, 1;<br \/>IPT_AUTO_CHAIN3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DROP, both, filter, FORWARD, 1, PSAD_BLOCK_FORWARD, 1;<\/p>\n<p>### Flush all existing rules in the psad chains at psad start time.<br \/>FLUSH_IPT_AT_INIT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### Prerequisite check for existence of psad chains and jump rules<br \/>IPTABLES_PREREQ_CHECK &nbsp; &nbsp; &nbsp; 1;<\/p>\n<p>### Enable tcp wrappers blocking (only gets enabled if<br \/>### ENABLE_AUTO_IDS is also set)<br \/>TCPWRAPPERS_BLOCK_METHOD &nbsp;&nbsp; N;<\/p>\n<p>### Set the whois timeout<br \/>WHOIS_TIMEOUT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 60;&nbsp; ### seconds<\/p>\n<p>### Set the number of times an ip can be seen before another whois<br \/>### lookup is issued.<br \/>WHOIS_LOOKUP_THRESHOLD &nbsp; &nbsp;&nbsp; 20;<\/p>\n<p>### Set the number of times an ip can be seen before another dns<br \/>### lookup is issued.<br \/>DNS_LOOKUP_THRESHOLD &nbsp; &nbsp; &nbsp;&nbsp; 20;<\/p>\n<p>### Enable psad to run an external script or program (use at your<br \/>### own risk!)<br \/>ENABLE_EXT_SCRIPT_EXEC &nbsp; &nbsp;&nbsp; N;<\/p>\n<p>### Define an external program to run after a scan is caught.<br \/>### Note that the scan source ip can be specified on the command<br \/>### line to the external program through the use of the &#8220;SRCIP&#8221;<br \/>### string (along with some appropriate switch for the program).<br \/>### Of course this is only useful if the external program knows<br \/>### what to do with this information.<br \/>### Example:&nbsp; EXTERNAL_SCRIPT &nbsp; &nbsp; &nbsp; \/path\/to\/script &#8211;ip SRCIP -v;<br \/>EXTERNAL_SCRIPT &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/bin\/true;<\/p>\n<p>### Control execution of EXTERNAL_SCRIPT (only once per IP, or<br \/>### every time a scan is detected for an ip).<br \/>EXEC_EXT_SCRIPT_PER_ALERT &nbsp; N;<\/p>\n<p>### Disk usage variables<br \/>DISK_CHECK_INTERVAL &nbsp; &nbsp; &nbsp; &nbsp; 300;&nbsp; ### seconds<\/p>\n<p>### This can be set to 0 to disable disk checking altogether<br \/>DISK_MAX_PERCENTAGE &nbsp; &nbsp; &nbsp; &nbsp; 95;<\/p>\n<p>### This can be set to 0 to have psad not place any limit on the<br \/>### number of times it will attempt to remove data from<br \/>### \/var\/log\/psad\/.<br \/>DISK_MAX_RM_RETRIES &nbsp; &nbsp; &nbsp; &nbsp; 10;<\/p>\n<p>### Enable archiving of old scan directories at psad startup.<br \/>ENABLE_SCAN_ARCHIVE &nbsp; &nbsp; &nbsp; &nbsp; N;<\/p>\n<p>### Truncate fwdata file at startup<br \/>TRUNCATE_FWDATA &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Y;<\/p>\n<p>### Only archive scanning IP directories that have reached a danger<br \/>### level greater than or equal to this value.&nbsp; Archiving old<br \/>### scanning ip directories only takes place at psad startup.<br \/>MIN_ARCHIVE_DANGER_LEVEL &nbsp;&nbsp; 1;<\/p>\n<p>### Email subject line config.&nbsp; Change these prefixes if you want<br \/>### psad to generate email alerts that say something other than<br \/>### the following.<br \/>MAIL_ALERT_PREFIX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [psad-alert];<br \/>MAIL_STATUS_PREFIX &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; [psad-status];<br \/>MAIL_ERROR_PREFIX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [psad-error];<br \/>MAIL_FATAL_PREFIX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [psad-fatal];<\/p>\n<p>### URL for getting the latest psad signatures<br \/>SIG_UPDATE_URL &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; http:\/\/www.cipherdyne.org\/psad\/signatures;<\/p>\n<p>### These next two are psadwatchd vars<br \/>PSADWATCHD_CHECK_INTERVAL &nbsp; 5;&nbsp; ### seconds<br \/>PSADWATCHD_MAX_RETRIES &nbsp; &nbsp;&nbsp; 10;<\/p>\n<p>### Directories<br \/>PSAD_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/var\/log\/psad;<br \/>PSAD_RUN_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/var\/run\/psad;<br \/>PSAD_FIFO_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/var\/lib\/psad;<br \/>PSAD_LIBS_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/usr\/lib\/psad;<br \/>PSAD_CONF_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/etc\/psad;<br \/>PSAD_ERR_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/errs;<br \/>CONF_ARCHIVE_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_CONF_DIR\/archive;<br \/>SCAN_DATA_ARCHIVE_DIR &nbsp; &nbsp; &nbsp; $PSAD_DIR\/scan_archive;<br \/>ANALYSIS_MODE_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/ipt_analysis;<br \/>SNORT_RULES_DIR &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_CONF_DIR\/snort_rules;<\/p>\n<p>### Files<br \/>FW_DATA_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/fwdata;<br \/>ULOG_DATA_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/ulogd.log;<br \/>FW_CHECK_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/fw_check;<br \/>DSHIELD_EMAIL_FILE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/dshield.email;<br \/>SIGS_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_CONF_DIR\/signatures;<br \/>ICMP_TYPES_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_CONF_DIR\/icmp_types;<br \/>AUTO_DL_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_CONF_DIR\/auto_dl;<br \/>SNORT_RULE_DL_FILE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_CONF_DIR\/snort_rule_dl;<br \/>POSF_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_CONF_DIR\/posf;<br \/>P0F_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_CONF_DIR\/pf.os;<br \/>IP_OPTS_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_CONF_DIR\/ip_options;<br \/>PSAD_FIFO_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_FIFO_DIR\/psadfifo;<br \/>ETC_HOSTS_DENY_FILE &nbsp; &nbsp; &nbsp; &nbsp; \/etc\/hosts.deny;<br \/>ETC_SYSLOG_CONF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/etc\/syslog.conf;<br \/>ETC_RSYSLOG_CONF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/etc\/rsyslog.conf;<br \/>ETC_SYSLOGNG_CONF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/etc\/syslog-ng\/syslog-ng.conf;<br \/>ETC_METALOG_CONF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/etc\/metalog\/metalog.conf;<br \/>STATUS_OUTPUT_FILE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/status.out;<br \/>ANALYSIS_OUTPUT_FILE &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/analysis.out;<br \/>INSTALL_LOG_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/install.log;<\/p>\n<p>### PID files<br \/>PSAD_PID_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_RUN_DIR\/psad.pid;<br \/>PSAD_CMDLINE_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_RUN_DIR\/psad.cmd;<br \/>KMSGSD_PID_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_RUN_DIR\/kmsgsd.pid;<br \/>PSADWATCHD_PID_FILE &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_RUN_DIR\/psadwatchd.pid;<\/p>\n<p>### List of ips that have been auto blocked by iptables<br \/>### or tcpwrappers (the auto blocking feature is disabled by<br \/>### default, see the psad man page and the ENABLE_AUTO_IDS<br \/>### variable).<br \/>AUTO_BLOCK_IPT_FILE &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/auto_blocked_iptables;<br \/>AUTO_BLOCK_TCPWR_FILE &nbsp; &nbsp; &nbsp; $PSAD_DIR\/auto_blocked_tcpwr;<\/p>\n<p>### File used internally by psad to add Netfilter blocking<br \/>### rules to a running psad process<br \/>AUTO_IPT_SOCK &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_RUN_DIR\/auto_ipt.sock;<\/p>\n<p>FW_ERROR_LOG &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_ERR_DIR\/fwerrorlog;<br \/>PRINT_SCAN_HASH &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/scan_hash;<\/p>\n<p>### \/proc interface for controlling ip forwarding<br \/>PROC_FORWARD_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/proc\/sys\/net\/ipv4\/ip_forward;<\/p>\n<p>### Packet counters for tcp, udp, and icmp protocols<br \/>PACKET_COUNTER_FILE &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/packet_ctr;<\/p>\n<p>### Top scanned ports<br \/>TOP_SCANNED_PORTS_FILE &nbsp; &nbsp;&nbsp; $PSAD_DIR\/top_ports;<\/p>\n<p>### Top signature matches<br \/>TOP_SIGS_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/top_sigs;<\/p>\n<p>### Top attackers<br \/>TOP_ATTACKERS_FILE &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/top_attackers;<\/p>\n<p>### Counter file for Dshield alerts<br \/>DSHIELD_COUNTER_FILE &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/dshield_ctr;<\/p>\n<p>### Counter file for iptables prefixes<br \/>IPT_PREFIX_COUNTER_FILE &nbsp; &nbsp; $PSAD_DIR\/ipt_prefix_ctr;<\/p>\n<p>### iptables command output and error collection files; these are<br \/>### used by IPTables::ChainMgr<br \/>IPT_OUTPUT_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $PSAD_DIR\/psad.iptout;<br \/>IPT_ERROR_FILE &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; $PSAD_DIR\/psad.ipterr;<\/p>\n<p>### system binaries<br \/>iptablesCmd &nbsp; &nbsp;&nbsp; \/sbin\/iptables;<br \/>shCmd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/bin\/sh;<br \/>wgetCmd &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/usr\/bin\/wget;<br \/>gzipCmd &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/bin\/gzip;<br \/>mknodCmd &nbsp; &nbsp; &nbsp; &nbsp; \/bin\/mknod;<br \/>psCmd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/bin\/ps;<br \/>mailCmd &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/usr\/bin\/mail;<br \/>sendmailCmd &nbsp; &nbsp;&nbsp; \/usr\/sbin\/sendmail;<br \/>ifconfigCmd &nbsp; &nbsp;&nbsp; \/sbin\/ifconfig;<br \/>killallCmd &nbsp; &nbsp; &nbsp; \/usr\/bin\/killall;<br \/>netstatCmd &nbsp; &nbsp; &nbsp; \/bin\/netstat;<br \/>unameCmd &nbsp; &nbsp; &nbsp; &nbsp; \/bin\/uname;<br \/># we do not need to compile the whois client<br \/># stripped the extention ..\/whois_psad<br \/>whoisCmd &nbsp; &nbsp; &nbsp; &nbsp; \/usr\/bin\/whois;<br \/>dfCmd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/bin\/df;<br \/>fwcheck_psadCmd&nbsp; \/usr\/sbin\/fwcheck_psad;<br \/>psadwatchdCmd &nbsp;&nbsp; \/usr\/sbin\/psadwatchd;<br \/>kmsgsdCmd &nbsp; &nbsp; &nbsp;&nbsp; \/usr\/sbin\/kmsgsd;<br \/>psadCmd &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; \/usr\/sbin\/psad;<\/p><\/blockquote>\n<p>&nbsp;\uc774 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uc124\uc815\uc5d0 \ub300\ud574 \uc0b4\ud3b4\ubcfc \uac83\uc774 \ub9ce\ub2e4. \uc6b0\uc120 psad\ub294 AUTO_BLOCK_TIMEOUT \ubcc0\uc218\ub97c \ud1b5\ud574 \uacf5\uaca9\uc790\ub97c \uc601\uc18d\uc801\uc73c\ub85c \ucc28\ub2e8\ud558\uc9c0 \uc54a\ub294\ub2e4(psad\ub294 \uacf5\uaca9\uc790\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc744 3600\ucd08, \uc989 \ud55c\uc2dc\uac04 \ub3d9\uc548\ub9cc \ucd94\uac00\ud55c\ub2e4). \ub458\uc9f8\ub85c \ucc28\ub2e8 \uaddc\uce59\uc774 \uc778\uc2a4\ud134\uc2a4\ud654\ub418\uae30 \uc804\uc5d0 \uacf5\uaca9\uc790\ub294 \ucd5c\uc18c\ud55c DANGER_LEVEL3\uc5d0 \ub3c4\ub2ec\ud574\uc57c \ud55c\ub2e4. \uc774\ub294 \ucd5c\uc18c\ud55c 150\uac1c\uc758 \ud328\ud0b7\uc744 \uc218\ubc18\ud558\uc9c0 \uc54a\uac70\ub098 \/etc\/psad\/signature \uc5d0\uc11c psad_dl\uc774 3\uc73c\ub85c \uc124\uc815\ub41c \uc11c\uba85\uacfc \ub9e4\uce6d\ub418\uc9c0 \uc54a\uac70\ub098 \/etc\/psad\/auto_dl \uc5d0\uc11c \uc704\ud5d8 \uc218\uc900\uc774 \ucd5c\uc18c\ud55c 3\uc73c\ub85c \uc790\ub3d9 \ud560\ub2f9\ub418\uc9c0 \uc54a\ub294 \uc2a4\uce94\uc5d0 \ub300\ud574\uc11c\ub294 \uc5b4\ub5a4 \uc870\uce58\ub3c4 \ucde8\ud574\uc9c0\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc744 \uc758\ubbf8\ud55c\ub2e4. \ub05d\uc73c\ub85c ENABLE_AUTO_IDS_REGEX\uac00 N \uc774\uae30 \ub54c\ubb38\uc5d0 IP \uc8fc\uc18c \ucc28\ub2e8\uc744 \uc704\ud574 \ud544\ud130\ub9c1 \uc815\ucc45\uc774 \ud2b9\uc218 \ub85c\uae45 \uc811\ub450\uc5b4\ub97c \uc0dd\uc131\ud560 \ud544\uc694\ub294 \uc5c6\ub2e4.<\/p>\n<p>&nbsp;** SYN \uc2a4\uce94 \uc751\ub2f5<\/p>\n<p>&nbsp;\uacf5\uaca9\uc790\uac00 iptables \ubc29\ud654\ubcbd\uc5d0 \ub300\ud574 \ud45c\uc900 Nmap SYN \uc2a4\uce94\uc744 \uc218\ud589\ud574\ubcf4\uc790.<\/p>\n<blockquote><p>soft-ftp:\/etc# nmap -sS -P0 -n X.X.X.X<\/p>\n<p>Starting Nmap 4.11 ( http:\/\/www.insecure.org\/nmap\/ ) at 2010-07-04 23:48 KST<br \/>Interesting ports on 117.17.172.120:<br \/>Not shown: 1674 filtered ports<br \/>PORT &nbsp;&nbsp; STATE&nbsp; SERVICE<br \/>20\/tcp&nbsp; closed ftp-data<br \/>21\/tcp&nbsp; open &nbsp; ftp<br \/>22\/tcp&nbsp; open &nbsp; ssh<br \/>53\/tcp&nbsp; closed domain<br \/>80\/tcp&nbsp; open &nbsp; http<br \/>443\/tcp closed https<\/p>\n<p>Nmap finished: 1 IP address (1 host up) scanned in 153.357 seconds<\/p><\/blockquote>\n<p>&nbsp;\uc2e4\uc81c\ub85c psad\ub294 (\uc55e\uc11c \uc124\uba85\ud55c\ub300\ub85c IPT_AUTO_CHAIN{n} \ubcc0\uc218\uc5d0 \uc815\uc758\ub41c \ub9de\ucda4\ud654 psad \uccb4\uc778\uc5d0 \ucc28\ub2e8 \uaddc\uce59\uc744 \ucd94\uac00\ud574\uc11c \uacf5\uaca9\uc790\ub97c \ucc28\ub2e8\ud588\uc73c\uba70, iptables -v -n -L \uc758 \ucd9c\ub825\uc744 \uc790\uc138\ud788 \uac80\uc0c9\ud558\ub294 \ub300\uc2e0 \uc0ac\uc6a9\uc790\uac00 psad \uccb4\uc778\uc5d0\uc11c \uc0c8\ub85c\uc6b4 \ucc28\ub2e8 \uaddc\uce59\uc744 \uc27d\uac8c \ubcfc \uc218 \uc788\uac8c \ud574\uc900\ub2e4.<\/p>\n<blockquote><p>root@seclab:\/etc\/psad# psad &#8211;fw-list<br \/>[+] Listing chains from IPT_AUTO_CHAIN keywords&#8230;<\/p>\n<p>Chain PSAD_BLOCK_INPUT (1 references)<br \/>&nbsp;pkts bytes target &nbsp; &nbsp; prot opt in &nbsp; &nbsp; out &nbsp; &nbsp; source &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination &nbsp; &nbsp; &nbsp; &nbsp; <br \/>&nbsp; 347 15268 DROP &nbsp; &nbsp; &nbsp; all&nbsp; &#8212;&nbsp; * &nbsp; &nbsp;&nbsp; * &nbsp; &nbsp; &nbsp; X.X.X.X &nbsp; &nbsp;&nbsp; 0.0.0.0\/0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/p>\n<p>Chain PSAD_BLOCK_OUTPUT (1 references)<br \/>&nbsp;pkts bytes target &nbsp; &nbsp; prot opt in &nbsp; &nbsp; out &nbsp; &nbsp; source &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination &nbsp; &nbsp; &nbsp; &nbsp; <br \/>&nbsp; &nbsp; 0 &nbsp; &nbsp; 0 DROP &nbsp; &nbsp; &nbsp; all&nbsp; &#8212;&nbsp; * &nbsp; &nbsp;&nbsp; * &nbsp; &nbsp; &nbsp; 0.0.0.0\/0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; X.X.X.X<br \/>&nbsp;&nbsp; <\/p>\n<p>Chain PSAD_BLOCK_FORWARD (1 references)<br \/>&nbsp;pkts bytes target &nbsp; &nbsp; prot opt in &nbsp; &nbsp; out &nbsp; &nbsp; source &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; destination &nbsp; &nbsp; &nbsp; &nbsp; <br \/>&nbsp; &nbsp; 0 &nbsp; &nbsp; 0 DROP &nbsp; &nbsp; &nbsp; all&nbsp; &#8212;&nbsp; * &nbsp; &nbsp;&nbsp; * &nbsp; &nbsp; &nbsp; 0.0.0.0\/0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; X.X.X.X &nbsp; &nbsp;&nbsp; <br \/>&nbsp; &nbsp; 0 &nbsp; &nbsp; 0 DROP &nbsp; &nbsp; &nbsp; all&nbsp; &#8212;&nbsp; * &nbsp; &nbsp;&nbsp; * &nbsp; &nbsp; &nbsp; X.X.X.X &nbsp; &nbsp; &nbsp; 0.0.0.0\/0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <\/p><\/blockquote>\n<p>&nbsp;\uc0c1\ud0dc \uce21\uba74\uc5d0\uc11c \ubcf4\uba74 psad &#8211;Status \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud574\uc11c IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc774 \uc55e\uc73c\ub85c \uc5bc\ub9c8 \ub3d9\uc548 \ub354 \uc720\ud6a8\ud55c\uc9c0 \ud655\uc778\ud560 \uc218\ub3c4 \uc788\ub2e4. \uc774 \uba85\ub839\uc5b4\uc758 \uc804\uccb4 \ucd9c\ub825\uc740 \uc5ec\uae30\uc5d0 \ubcf4\uc774\uc9c0 \uc54a\uc9c0\ub9cc \ub05d\ubd80\ubd84\uc5d0\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ub450 \uc904\uc774 \ub098\uc628\ub2e4. \uc774 \uacbd\uc6b0 \uc544\ub798\uc758 \ub450 \uc904\uc744 \ud1b5\ud574 IP X.X.X.X \uac00 \ucd1d 65\ucd08 \ub3d9\uc548 \ub354 \ucc28\ub2e8\ub41c\ub2e4\ub294 \uac83\uc744 \uc54c \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>&nbsp; &nbsp; iptables auto-blocked IPs:<br \/>&nbsp; &nbsp; &nbsp; X.X.X.X (65 seconds remaining)<\/p><\/blockquote>\n<p>&nbsp;\ub05d\uc73c\ub85c \ubaa9\ud45c\uac00 \uacf5\uaca9\uc790\ub85c\ubd80\ud130 \uc811\uadfc\ud560 \uc218 \uc5c6\uac8c \ub410\ub2e4\ub294 \uac83\uc744 \ud655\uc778\ud558\uae30 \uc704\ud574 \uc2a4\uce94\uc744 \ub2e4\uc2dc \uc2dc\ub3c4\ud574\ubcf4\uc790. \uc774\ubc88\uc5d0\ub294 \uadf8 \uc5b4\ub5a4 \ud3ec\ud2b8\ub3c4 \ub3c4\ub2ec\ud560 \uc218 \uc5c6\uc744 \uac83\uc774\ub2e4.<\/p>\n<p>&nbsp;* \uc368\ub4dc\ud30c\ud2f0 \ub3c4\uad6c\uc640 psad \ub2a5\ub3d9\uc801 \uc751\ub2f5\uc758 \ud1b5\ud569<\/p>\n<p>&nbsp;\ub9ce\uc740 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc5c5\uccb4\uac00 \uc368\ub4dc\ud30c\ud2f0 \uc18c\ud504\ud2b8\uc6e8\uc5b4\uac00 \uc790\uc0ac \uc18c\ud504\ud2b8\uc6e8\uc5b4\ub97c \uad00\ub9ac\ud558\uac70\ub098 \uc790\uc0ac \uc18c\ud504\ud2b8\uc6e8\uc5b4\uc640 \uc5f0\ub3d9\ud558\uae30 \uc27d\uac8c API \ub97c \ub9cc\ub4e0\ub2e4. API \ub97c \uc774\uc6a9\ud558\uc9c0 \uc54a\uc73c\uba74 \uc5bb\uc744 \uc218 \uc5c6\ub294 \uc735\ud1b5\uc131, \ud50c\ub7ec\uadf8\uc778 \uac00\ub2a5\uc131, \uc2a4\ud06c\ub9bd\ud2b8\ud654 \uac00\ub2a5\uc131\uc774 API\ub97c \ud1b5\ud574 \uc81c\uacf5\ub418\uae30 \ub54c\ubb38\uc5d0 API\ub294 \uc0ac\uc6a9\uc790\ub098 \uc124\uce58 \uae30\ubc18\uc744 \uc99d\uac00\uc2dc\ud0ac \uc218 \uc788\ub2e4.<\/p>\n<p>&nbsp;** \uba85\ub839 \ud589 \uc778\ud130\ud398\uc774\uc2a4<\/p>\n<p>&nbsp;psad\ub294 \ub3d9\uc801\uc73c\ub85c \ucd94\uac00\ub418\ub294(\uadf8\ub9ac\uace0 \uc0ad\uc81c\ub418\ub294) iptables \uaddc\uce59\uc744 \ud1b5\ud574 \uacf5\uaca9 IP \uc8fc\uc18c\ub97c \ucc28\ub2e8\ud558\ub294 \uac83 \uc774\uc0c1\uc758 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4. \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uae30\ub2a5 \uc5ed\uc2dc (\uc751\ub2f5 \uae30\ub2a5\uc744 \uc27d\uac8c \uc2a4\ud06c\ub9bd\ud2b8\ud654 \uac00\ub2a5\ud558\uac8c \ud574\uc8fc\ub294) \uba85\ub839 \ud589 \uc778\ud130\ud398\uc774\uc2a4\ub97c \ud1b5\ud558\uac70\ub098 \uc720\ub2c9\uc2a4 \ub3c4\uba54\uc778 \uc18c\ucf13\uc744 \ud1b5\ud574 \uc2e4\ud589 \uc911\uc778 psad \ub370\ubaac\uacfc \uc880 \ub354 \uc9c1\uc811\uc801\uc73c\ub85c \ud1b5\uc2e0\ud568\uc73c\ub85c\uc368 \uc368\ub4dc\ud30c\ud2f0 \ub3c4\uad6c\uc640 \uc27d\uac8c \ud1b5\ud569\ub420 \uc218 \uc788\ub2e4. \ub2e4\uc74c\uc740 \uc81c3\uc790 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 iptables \uaddc\uce59\uc9d1\ud569 \uad00\ub9ac \uae30\ub2a5\uc744 \uc9c1\uc811 \ub9cc\ub4dc\ub294 \ub300\uc2e0 \uc774\ub97c \uc704\ud574 psad\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\uc774 \uac00\uc9c0\ub294 \uc7a5\uc810\uc774\ub2e4.<\/p>\n<p>&nbsp;&#8211; \ud0c0\uc774\uba38\uc5d0 \uae30\ubc18\ud574\uc11c \uaddc\uce59\uc744 \ub9cc\ub8cc\uc2dc\ud0ac \uc218 \uc788\ub294 \uae30\ub2a5\uc774 psad\uc5d0 \ub0b4\uc7a5\ub3fc \uc788\uc73c\ubbc0\ub85c \ub530\ub85c \uac1c\ubc1c\ud560 \ud544\uc694\uac00 \uc5c6\ub2e4.<br \/>&nbsp;&#8211; psad\ub294 \ub3d9\uc801\uc73c\ub85c \uc0dd\uc131\ub41c \uaddc\uce59\uc758 \uc0bd\uc785\uacfc \uc0ad\uc81c\ub97c \uc790\uc2e0\ub9cc\uc758 \uccb4\uc778\uc5d0\uc11c \uad00\ub9ac\ud55c\ub2e4. \uc774\ub294 psad \uaddc\uce59\uc744 \uae30\uc874\uc758 iptables \uc815\ucc45\uacfc \uc644\uc804\ud788 \ubd84\ub9ac\uc2dc\ud0a8\ub2e4.<br \/>&nbsp;&#8211; psad\ub294 psad \uccb4\uc778\uc5d0 \uc774\ubbf8 \ucc28\ub2e8 \uaddc\uce59\uc774 \uc788\ub294 \uacbd\uc6b0 \ud574\ub2f9 IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c\uc5d0 \ub300\ud574 \uc911\ubcf5 \uaddc\uce59\uc744 \ucd94\uac00\ud558\uc9c0 \uc54a\ub294\ub2e4.<br \/>&nbsp;&#8211; psad\ub294 \/etc\/psad\/auto_dl \ud30c\uc77c\uc744 \uc774\uc6a9\ud574\uc11c \ud5c8\uc6a9\ub41c IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c\uac00 \ucc28\ub2e8\ub418\uc9c0 \uc54a\uac8c \ubcf4\uc7a5\ud55c\ub2e4.<br \/>&nbsp;&#8211; \ud604\uc7ac \ucc28\ub2e8 \uc911\uc778 IP \uc8fc\uc18c\uc5d0 \ub300\ud55c \uc0c1\ud0dc \uc815\ubcf4\ub294 psad &#8211;Status \uba85\ub839\uc744 \ud1b5\ud574 \uc27d\uac8c \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<br \/>&nbsp;&#8211; psad \ub9de\ucda4\ud654 \uccb4\uc778\uc758 \ubaa9\ub85d\uc740 psad &#8211;fw-list \uba85\ub839\uc744 \ud1b5\ud574 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. \uc774\ub97c \ud1b5\ud574 psad\ub97c \ud1b5\ud574 \uc0dd\uc131\ub41c iptables \uaddc\uce59\uacfc \ubcf5\uc7a1\ud55c \ud544\ud130\ub9c1 \uc815\ucc45 \ub0b4\uc758 \ub2e4\ub978 \uaddc\uce59\uc744 \uc27d\uac8c \uad6c\ubcc4\ud560 \uc218 \uc788\ub2e4.<\/p>\n<blockquote><p>&nbsp;psad\uc758 \uba85\ub839 \ud589 \ud638\ucd9c\uc744 \ud1b5\ud574 \uc774\uc6a9\ud560 \uc218 \uc788\ub294 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 \uc2dc\uc2a4\ud15c\uc5d0 \ub370\ubaac\uc73c\ub85c \uc2e4\ud589 \uc911\uc778 psad \uc778\uc2a4\ud134\uc2a4\uac00 \uc788\uc5b4\uc57c \ud55c\ub2e4. \uc2e4\ud589 \uc911\uc778 psad \ub370\ubaac\uc774 \uc5c6\ub2e4\uba74 \ud604\uc7ac psad\uac00 \uc2e4\ud589 \uc911\uc774\uc9c0 \uc54a\ub2e4\ub294 \uc624\ub958\uac00 \ubc1c\uc0dd\ud55c\ub2e4.<\/p><\/blockquote>\n<p>&nbsp;&#8211; \ucc28\ub2e8 \uaddc\uce59 \ucd94\uac00<\/p>\n<p>&nbsp;&#8211;fw-block-ip \uba85\ub839 \ud589 \uc778\uc790\ub97c \uc0ac\uc6a9\ud558\uba74 \uc9c1\uc811 \ud2b9\uc815 IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c\uc5d0 \ub300\ud55c \ucc28\ub2e8 \uaddc\uce59\uc744 \ub9de\ucda4\ud654 psad \uccb4\uc778\uc5d0 \ucd94\uac00\ud560 \uc218 \uc788\ub2e4. \ub2e4\uc74c\uc758 \uc608\ub97c \ubcf4\uc790.<\/p>\n<blockquote><p>root@seclab:\/etc\/psad# psad &#8211;fw-block-ip 192.168.10.1<br \/>[+] Writing 192.168.10.1 to socket; psad will add the IP<br \/>&nbsp; &nbsp; within 5 seconds.<\/p><\/blockquote>\n<p> \uc77c\ub2e8 \uc2e4\ud589 \uc911\uc778 psad \ub370\ubaac\uc5d0\uc11c CHECK_INTERVAL \ud0c0\uc774\uba38\uac00 \ub9cc\ub8cc\ub418\uba74 \ud574\ub2f9 IP \uc8fc\uc18c\ub294 AUTO_BLOCK_TIMEOUT \ubcc0\uc218\uc5d0 \ud574\ub2f9\ud558\ub294 \uae30\uac04 \ub3d9\uc548 \ucc28\ub2e8 \uccb4\uc778\uc5d0 \ucd94\uac00\ub41c\ub2e4.<\/p>\n<blockquote><p>Jul&nbsp; 5 01:13:25 seclab psad: added iptables auto-block against 192.168.10.1 for 360 seconds<\/p><\/blockquote>\n<p>&nbsp;&#8211; \ucc28\ub2e8 \uaddc\uce59 \uc81c\uac70<\/p>\n<p>&nbsp;\ud2b9\uc815 IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c\uc5d0 \ub300\ud55c \ubaa8\ub4e0 \ucc28\ub2e8 \uaddc\uce59\uc744 \uc81c\uac70\ud558\ub824\uba74 &#8211;fw-rm-block-ip \uba85\ub839 \ud589 \uc778\uc790\ub97c \uc0ac\uc6a9\ud55c\ub2e4.<\/p>\n<blockquote><p>root@seclab:\/etc\/psad# psad &#8211;fw-rm-block-ip 192.168.10.1<br \/>[+] Writing 192.168.10.1 to socket; psad will remove the IP<br \/>&nbsp; &nbsp; within 5 seconds.<\/p><\/blockquote>\n<p>&nbsp;\uc2e4\uc81c\ub85c \uc2e4\ud589 \uc911\uc778 psad\uac00 \ucc28\ub2e8 \uaddc\uce59\uc744 \ub9cc\ub8cc\uc2dc\ud0a8\ub2e4.<\/p>\n<blockquote><p>Jul&nbsp; 5 01:17:00 seclab psad: removed iptables auto-block against 192.168.10.1<\/p><\/blockquote>\n<p>&nbsp;&#8211; \ubaa8\ub4e0 \ucc28\ub2e8 \uaddc\uce59 \uc81c\uac70<\/p>\n<p>&nbsp;\ub54c\ub54c\ub85c \uae30\ubcf8\uc801\uc778 \ub124\ud2b8\uc6cc\ud06c \uc5f0\uacb0\uc131\uc5d0 \ubb38\uc81c\uac00 \uc0dd\uae38 \uc218 \uc788\uc73c\uba70, \uc5b4\ub5a4 \uacbd\uc6b0\uc5d0\ub294 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uae30\ubc95 \ub54c\ubb38\uc5d0 \uc774\ub7f0 \uc5f0\uacb0\uc131 \ubb38\uc81c\uac00 \uc545\ud654\ub420 \uc218 \uc788\ub2e4. \ud2b9\uc815 IP \uc8fc\uc18c\ub098 \ub124\ud2b8\uc6cc\ud06c\ub97c \ud5c8\uc6a9 \ubaa9\ub85d\uc5d0 \ucd94\uac00\ud560 \uc218 \uc788\ub294 \uc81c\uacf5\ud558\ub294 \uac83 \uc678\uc5d0\ub3c4 \ub2a5\ub3d9\uc801 \uc751\ub2f5 \uae30\ubc95\uc740 \ub124\ud2b8\uc6cc\ud06c\uc5d0 \uc790\uc2e0\uc774 \ubbf8\uce58\ub294 \uc601\ud5a5\uc744 \uc27d\uac8c \uc81c\uac70\ud560 \uc218 \uc788\uac8c \ud574\uc918\uc57c \ud55c\ub2e4. psad\uc758 \uacbd\uc6b0\uc5d0\ub294 \ub3d9\uc801\uc73c\ub85c \uc0dd\uc131\ub418\ub294 iptables \uaddc\uce59\ubfd0\ub9cc \uc544\ub2c8\ub77c \ub9de\ucda4\ud654 psad \uccb4\uc778\uc5d0 \uc874\uc7ac\ud558\ub294 \ubaa8\ub4e0 \uaddc\uce59\uc744 \uc27d\uac8c \uc81c\uac70\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\ub3c4 \uc81c\uacf5\ud574\uc57c \ud55c\ub2e4. psad &#8211;Flush \uba85\ub839\uc774 \uc774 \uae30\ub2a5\uc744 \uc81c\uacf5\ud55c\ub2e4.<\/p>\n<blockquote><p>root@seclab:~# psad &#8211;Flush<br \/>[+] Flushing psad chains.<\/p><\/blockquote>\n<p>&nbsp;\uc77c\ub2e8 CHECK_INTERVAL \ud0c0\uc774\uba38\uac00 \ub9cc\ub8cc\ub418\uba74 \uc2e4\ud589 \uc911\uc778 psad \ub370\ubaac\uc774 \ub2e4\uc74c\uacfc \uac19\uc740 syslog \uba54\uc2dc\uc9c0\ub97c \uc0dd\uc131\ud55c\ub2e4.<\/p>\n<blockquote><p>Jul&nbsp; 6 00:28:52 seclab psad: flushing existing psad iptables auto-response chains<br \/>Jul&nbsp; 6 00:28:52 seclab psad: flushed: PSAD_BLOCK_INPUT<br \/>Jul&nbsp; 6 00:28:52 seclab psad: flushed: PSAD_BLOCK_OUTPUT<br \/>Jul&nbsp; 6 00:28:52 seclab psad: flushed: PSAD_BLOCK_FORWARD<\/p><\/blockquote>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp;* \uce68\uc785 \ubc29\uc9c0\uc640 \ub2a5\ub3d9\uc801 \uc751\ub2f5 &nbsp;\uc624\ub298\ub0a0 \ub098\uc640 \uc788\ub294 \ub2e4\uc591\ud55c \ubcf4\uc548 \uc81c\ud488, \uae30\uc220, \uc194\ub8e8\uc158\uc5d0\uc11c \uce68\uc785 \ud0d0\uc9c0\ub77c\ub294 \uc6a9\uc5b4\ub294 \ud070 \uc8fc\ubaa9\uc744 \ubc1b\uc544\uc654\ub2e4. \uc774\ub7ec\ud55c \uc8fc\ubaa9\uc758 \ub300\ub2e4\uc218\ub294 \uc774 \uc6a9\uc5b4\uac00 \uc8fc\ub294 \uc9c0\ub098\uce58\uac8c \uac15\ud55c \uc758\ubbf8\uc5d0\uc11c \ub098\uc628\uac83\uc73c\ub85c \ubcf4\uc778\ub2e4. \ubb3c\ub860 \ubcf4\uc548 \uce68\ubd80\ub97c \uc0ac\uc804\uc5d0 \ubc29\uc9c0\ud55c\ub2e4\ub294 \uac1c\ub150 \uc790\uccb4\uac00 \uc7a5\uc810\uc774 \uc5c6\ub2e4\ub294 \ub73b\uc740 &hellip; <a href=\"http:\/\/pchero21.com\/?p=893\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[52],"tags":[218,311,557,664],"_links":{"self":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/893"}],"collection":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=893"}],"version-history":[{"count":0,"href":"http:\/\/pchero21.com\/index.php?rest_route=\/wp\/v2\/posts\/893\/revisions"}],"wp:attachment":[{"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=893"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pchero21.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}