Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Linux iptables ¶Ë¿Ú Ó³Éä°¸Àý

iptablesÊÇÒ»¸ö
Linux
ÏÂÓÅÐãµÄnat+·À»ðǽ¹¤¾ß£¬ÎÒʹÓøù¤¾ßÒԽϵÍÅäÖõĴ«Í³pcÅäÖÃÁËÒ»¸ö
Áé»îÇ¿¾¢µÄ·À»ðǽ+natϵ
ͳ,СÓÐÐĵ㬿´
ÁËÍøÉÏÒ²ÓкܶàÕâ·½ÃæµÄÎÄÕ£¬µ«ÊÇËƺõҪô˵µÄ±È½ÏÉÙ£¬ÒªÃ´¾ÍÊDZȽÏÆ«£¬ÄÚÈݲ»È«£¬ÈÝÒ×Îóµ¼£¬ÎÒÑо¿ÁËÒ»¶Îʱ¼äµÄiptablesͬʱҲÓÃÁ˺ܾã¬ÓеãµÎ
¾­Ñ飬дÀ´¹©´ó¼Ò²Î¿¼£¬Í¬Ê±Ò²±¸ÈÕºó×Ô¼º·­ÔÄ¡£
Ê×ÏÈҪ˵Ã÷µÄÊÇ£¬iptables²Ù×÷µÄÊÇ2.4ÒÔÉÏÄں˵Änetfilter.ËùÒÔÐèÒª linuxµÄÄÚºËÔÚ2.4ÒÔÉÏ¡£Æ书ÄÜÓ밲ȫÐÔÔ¶Ô¶±ÈÆäÇ°±²
ipfwadm,ipchainsÇ¿´ó£¬iptables´óÖÂÊǹ¤×÷ÔÚOSIÆß²ãµÄ¶þ¡¢Èý¡¢ËIJ㣬ÆäÇ°±²ipchains
²»Äܵ¥¶ÀʵÏÖ¶Ôtcp/udp
portÒÔ¼°¶ÔmacµØÖ·
µÄ
µÄ¶¨ÒåÓë²Ù×÷£¬ËùÒÔÎÒÏëipchainsÓ¦¸ÃÊǽö½ö¹¤×÷ÔÚÈý²ãÉϵġ£
ÎÒÃÇ
Ïȼòµ¥½éÉÜÒ»ÏÂ
netfilterµÄ´óÖ¹¤×÷Á÷³Ì£¬Ò²¾ÍÊÇÒ»¸öÊý¾Ý°ü£¨»òÕ߽зÖ×é¡¢packet,ÎÒ¸öÈËÏ°¹ß½Ð°ü£©ÔÚµ½´ïlinuxµÄÍøÂç½Ó¿ÚµÄʱºò
£¨Íø¿¨£©ÈçºÎ´¦ÀíÕâ¸ö°ü£¬È»ºóÔÙ½éÉÜÒ»ÏÂÈçºÎÓÃiptables¸Ä±ä»òÕß˵¿ØÖƶÔÕâ¸öÊý¾Ý°ü½øÐвÙ×÷¡£netfilterÄÚ²¿·ÖΪÈý¸ö±í£¬·Ö±ðÊÇ
filter,nat,mangle£¬Ã¿¸ö±íÓÖÓв»Í¬µÄ²Ù×÷Á´£¨Chains£©¡£ÔÚfilter£¨¹ýÂË£©±íÖУ¬Ò²¾ÍÊÇËûµÄ·À»ðǽ¹¦ÄܵÄÕâ¸ö±í£¬¶¨ÒåÁËÈý¸ö

Chain¡£·Ö±ðÊÇINPUT,FORWARD,OUTPUT¡£Ò²¾ÍÊǶ԰üµÄÈ롢ת·¢¡¢³ö½øÐж¨ÒåµÄÈý¸ö¹ýÂËÁ´¡£¶ÔÓÚÕâ¸öfilter±íµÄ²Ù×÷ºÍ¿ØÖÆÒ²ÊÇ
ÎÒÃÇ
ʵÏÖ·À»ðǽ¹¦ÄܵÄÒ»¸ö
ÖØÒªÊֶΣ»ÔÚnat(Network Address
Translation¡¢ÍøÂçµØÖ··­Òë)±íÖУ¬Ò²¾ÍÊÇÎÒÃÇÓÃÒÔʵÏÖµØַת»»ºÍ¶Ë¿Úת·¢¹¦ÄܵÄÕâ¸ö±í£¬¶¨ÒåÁËPREROUTING,
POSTROUTING,OUTPUTÈý¸öÁ´,ÏÂÃæÎÒÃÇ»á¶ÔÕâÈý¸öÁ´×÷ÏêϸµÄ˵Ã÷£»¶ønetfilterµÄmangle±íÔòÊÇÒ»¸ö×Ô¶¨Òå±í£¬ÀïÃæ°üÀ¨ÉÏÃæ

µÄfilterÒÔ¼°nat±íÖеĸ÷ÖÖchains,Ëü¿ÉÒÔÈÃÎÒÃǽøÐÐһЩ×Ô¶¨ÒåµÄ²Ù×÷£¬Í¬Ê±Õâ¸ömangle±íÖеÄchainsÔÚnetfilter¶Ô°ü

µÄ´¦ÀíÁ÷³ÌÖд¦ÔÚÒ»¸ö±È½ÏÓÅÏȵÄλÖã¬ÏÂÃæÓÐÒ»ÕÅͼÇåÎúµÄÃè»æÁËnetfilter¶Ô°üµÄ´¦ÀíÁ÷³Ì£¨¸Ãͼժ×ÔÍøÉÏ£¬²»Öª×÷ÕßÊÇË­£¬ÔÚ´ËÉî±í¾´Ò⣡£©£¬Ò»°ã
Çé¿öÏ£¬ÎÒÃÇÓò»µ½Õâ¸ömangle±í£¬ÔÚÕâÀïÎÒÃǾͲ»×ö½éÉÜÁË¡£
´ó¼Ò¿ÉÒÔ¿´µ½£¬PREROUTINGÕâ¸öchainÔÚ×îÇ°Ã棬µ±Ò»¸ö°üÀ´µ½linuxµÄÍøÂç½Ó¿ÚµÄʱºòÏȹýmangleµÄPREROUTING,È»ºóÊÇ
natµÄPREROUTING,´ÓÕâ¸öchainµÄÃû×ÖÎÒÃÇ¿ÉÒÔ¿´³ö£¬Õâ¸öchainÊÇÔÚ·ÓÉ֮ǰ(pre-routing)Òª¹ýµÄ¡£ÎªÊ²Ã´ÒªÔÚ·ÓÉ֮ǰ
¹ýÄØ£¿´ó¼Ò¿ÉÒÔ¿´µ½Õâ¸öͼÉÏ£¬ÉÏÃæÓÐÒ»¸öÁâÐεIJ¿·Ö½ÐROUTING,Õâ¸öROUTING²¿·Ö¾ÍÊÇLinuxµÄroute


Ïà¹ØÎĵµ£º

Linux²é¿´ÏµÍ³ÅäÖó£ÓÃÃüÁî

ϵͳ
# uname -a               # ²é¿´
ÄÚºË/²Ù×÷ϵͳ/CPUÐÅÏ¢
# head -n
1 /etc/issue   # ²é¿´
²Ù×÷ϵͳ°æ±¾
# cat /proc/cpuinfo      # ²é¿´
CPUÐÅÏ¢
#
hostname    &nb ......

linuxÍøÂçÉ豸Çý¶¯

ÍøÂçÉ豸½á¹¹Ì壺
struct sk_bufff{}
ËüµÄ¶¨ÒåÔÚlinux/skbuff.hÖÐ
sk_buff ÖÐÓÐÈý²¿·ÖЭÒéÍ··Ö±ðÃüÃûΪ¡°h,nh,mac¡±
h:Ϊ´«Êä²ãЭÒé(ICMP,IGMP)¡£
nh:ΪÍøÂç²ãЭÒéÍ·¡£
mac:Á´Â·²ãЭÒéÍ·¡£ Èý¸öЭÒéÍ·ÊÇʹÓÃÁªºÏÌåµÄ£¬Ô­ÒòÊÇ£¬Ð­Òé±¾ÉíÊÇ»¥³âµÄ¡£ ½á¹¹ÌåµÄ¶¨Òå¿ÉÒÔ¿´Í·Îļþ»òÊÇ¡¶ÄÚºË ......

linux framebufferÇý¶¯È«Æª

±¾ÎÄÏêϸ½éÉÜÈçºÎ±àдһ¸öÏÔ¿¨µÄÇý¶¯³ÌÐò¡£
framebuffer
deviceÔÚÄÚºËÀïÃæ×÷ΪÏÔ¿¨Çý¶¯Ä£ÐÍ£¬Ðí¶àº¯ÊýºÍÊý¾Ý½á¹¹¶¼ÊÇÌض¨£¬ÕýÊÇÕâЩÌض¨µÄ¶«Î÷ΪÎÒÃǵıà³ÌÌṩÁË·½±ã¡£
Òª¿ª·¢frame buffer
deviceÇý¶¯£¬ÄãÓ¦¸ÃÔĶÁSource\Source\Documentation\fbÏÂÃæµÄ˵Ã÷Îļþ£¬Èý¸öÖØÒªÎļþ00-
INDEX£¬framebuffer.txt£¬internal ......

Linux °²×°¼Æ»®

1. ´ÓÓ²ÅÌ°²×°linuxµÄѧϰ£¬ºÍʵÑé   Done
     Use wingrub, install the Ubuntu on /dev/sda2. and could boot!
2.  pppoe connection                      &nbs ......

Linux ×Ö·ûÉ豸Çý¶¯³ÌÐòµÄ±àд¿ò¼Ü

Ò»¡¢Linux device driver µÄ¸ÅÄî

ϵͳµ÷ÓÃÊDzÙ×÷ϵͳÄں˺ÍÓ¦ÓóÌÐòÖ®¼äµÄ½Ó¿Ú£¬É豸Çý¶¯³ÌÐòÊDzÙ×÷ϵͳÄں˺ͻúÆ÷Ó²¼þÖ®¼äµÄ½Ó¿Ú¡£É豸Çý¶¯³ÌÐòΪӦÓóÌÐòÆÁ±ÎÁËÓ²¼þµÄϸ½Ú£¬ÕâÑùÔÚÓ¦ÓóÌ
Ðò¿´À´£¬Ó²¼þÉ豸ֻÊÇÒ»¸öÉ豸Îļþ£¬Ó¦ÓóÌÐò¿ÉÒÔÏó²Ù×÷ÆÕͨÎļþÒ»Ñù¶ÔÓ²¼þÉ豸½øÐвÙ×÷¡£Éè±¸Ç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ