Linux netfilterÔ´Âë·ÖÎö(5)
Îå¡¢ ipt_do_table()º¯Êý£¬Êý¾Ý°üµÄ¹ýÂË
5.1 ipt_entry Ïà¹Ø½á¹¹ ip_tables.h
ipt_entry½á¹¹Ç°ÃæÓйýÁË£¬ÔÙ¿´Ò»±é
struct ipt_entry
{
struct ipt_ip ip;
/* ËùҪƥÅäµÄ±¨ÎĵÄIPÍ·ÐÅÏ¢ */
unsigned int nfcache;
/* λÏòÁ¿£¬±êʾ±¾¹æÔò¹ØÐı¨ÎĵÄʲô²¿·Ö£¬ÔÝδʹÓà */
u_int16_t target_offset;
/* targetÇøµÄÆ«ÒÆ£¬Í¨³£targetÇøÎ»ÓÚmatchÇøÖ®ºó£¬¶ømatchÇøÔòÔÚipt_entryµÄĩβ£»
³õʼ»¯Îªsizeof(struct ipt_entry)£¬¼´¼Ù¶¨Ã»ÓÐmatch */
u_int16_t next_offset;
/* ÏÂÒ»Ìõ¹æÔòÏà¶ÔÓÚ±¾¹æÔòµÄÆ«ÒÆ£¬Ò²¼´±¾¹æÔòËùÓÿռäµÄ×ܺͣ¬
³õʼ»¯Îªsizeof(struct ipt_entry)+sizeof(struct ipt_target)£¬¼´Ã»ÓÐmatch */
unsigned int comefrom;
/* λÏòÁ¿£¬±ê¼Çµ÷Óñ¾¹æÔòµÄHOOKºÅ£¬¿ÉÓÃÓÚ¼ì²é¹æÔòµÄÓÐЧÐÔ */
struct ipt_counters counters;
/* ¼Ç¼¸Ã¹æÔò´¦Àí¹ýµÄ±¨ÎÄÊýºÍ±¨ÎÄ×Ü×Ö½ÚÊý */
unsigned char elems[0];
/*target»òÕßÊÇmatchµÄÆðʼλÖà */
}
ipt_ip½á¹¹ ip_tables.h
struct ipt_ip {
struct in_addr src, dst; /* À´Ô´/Ä¿µÄµØÖ· */
struct in_addr smsk, dmsk; /* À´Ô´/Ä¿µÄµØÖ·µÄÑÚÂë */
char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; /*ÊäÈëÊä³öÍøÂç½Ó¿Ú*/
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
u_int16_t proto; /* ÐÒé, 0 = ANY */
u_int8_t flags; /* ±êÖ¾×Ö¶Î */
u_int8_t invflags; /* È¡·´±êÖ¾ */
};
5.2 ipt_do_tableº¯Êý ip_tables.c
unsigned int
ipt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
&
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
¹ØÓÚ´ËÎÄ
±¾ÎĵµÓÃÓÚÉý¼¶
ExtMail
£¬
ExtMan
°æ±¾£¬Éý¼¶×Ô
ExtMail 0.24(
º¬ÒÔϰ汾£©µ½
1.0.5
Îȶ¨°æ
,
±¾ÎĵµÖ»ÄÜÊÊÓÃÓÚÊý¾Ý¿âÊÇ
mysql
µÄ°æ±¾
,
¼ÙÉè°²×°ÓʾֵÄÓòÃû
Ϊ
extmail
.org
£¬¶ÁÕßÇë¸ù¾Ý×ÔÉíʵ¼ÊÇé¿öÓèÒÔÐ޸ġ£
Éý¼¶²½Öè
1.
Í£Ö¹·þÎñ£º
postifx,http,mysql,pop3
service httpd stop
......
¹¦ÄÜ˵Ã÷£º½¨Á¢»òÐ޸ı¸´æÎļþ£¬»òÊÇ´Ó±¸´æÎļþÖгéÈ¡Îļþ¡£
Óï¡¡¡¡·¨£ºar[-dmpqrtx][cfosSuvV][a<³ÉÔ±Îļþ>][b<³ÉÔ±Îļþ>][i<³ÉÔ±Îļþ>][±¸´æÎļþ][³ÉÔ±Îļþ]
²¹³ä˵Ã÷£ºar¿ÉÈÃÄú¼¯ºÏÐí¶àÎļþ£¬³ÉΪµ¥Ò»µÄ±¸´æÎļþ¡£ÔÚ±¸´æÎļþÖУ¬ËùÓгÉÔ±Îļþ½Ô±£ÓÐÔÀ´µÄÊôÐÔÓëȨÏÞ¡£
²Î¡¡¡¡Êý£º
¡¡Ö¸Áî²ÎÊý
¡ ......
ËÄ¡¢nf_hook_ops ¹³×ÓµÄ×¢²á
ÔÚfilter±íµÄ³õʼ»¯º¯Êýstatic int __init init(void)ÖгýÁËÓÐÒ»¸önf_register_hookº¯Êý×¢²áÒ»¸ötablesÍ⣬»¹ÓÉnf_register_hookº¯Êý×¢²áÁË3¸öhook
4.1 nf_hook_opsÊý¾Ý½á¹¹ netfilter.h
struct nf_hook_ops
{
......