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

Linux ѧϰʹÓà iptables


ÔÚÕýʽ½éÉÜ iptables
µÄʹÓÃ
֮ǰ£¬ÎÒÃÇÏÈÀ´¿´Ò»ÏÂºÍ iptables

Ïà¹ØµÄһЩ»ù±¾¸ÅÄî¡£ÎÒÃÇÏÂÃ潫»áƵ·±Ê¹ÓÃ
µ½
ËüÃÇ¡£
Æ¥Å䣨match£©£º·ûºÏÖ¸¶¨µÄÌõ¼þ£¬±ÈÈçÖ¸¶¨µÄ IP µØÖ·ºÍ¶Ë¿Ú¡£
¶ªÆú£¨drop£©£ºµ±Ò»¸ö°üµ½´ïʱ£¬¼òµ¥µØ¶ªÆú£¬²»×öÆäËüÈκδ¦Àí¡£
½ÓÊÜ£¨accept£©£ººÍ¶ªÆúÏà·´£¬½ÓÊÜÕâ¸ö°ü£¬ÈÃÕâ¸ö°üͨ¹ý¡£
¾Ü¾ø£¨reject£©£ººÍ¶ªÆúÏàËÆ£¬µ«Ëü»¹»áÏò·¢ËÍÕâ¸ö°üµÄÔ´Ö÷»ú·¢ËÍ´íÎóÏûÏ¢¡£Õâ¸ö´íÎóÏûÏ¢¿ÉÒÔÖ¸¶¨£¬Ò²¿ÉÒÔ×Ô¶¯²úÉú¡£
Ä¿±ê£¨target£©£ºÖ¸¶¨µÄ¶¯×÷£¬ËµÃ÷ÈçºÎ´¦ÀíÒ»¸ö°ü£¬±ÈÈ磺¶ªÆú£¬½ÓÊÜ£¬»ò¾Ü¾ø¡£
Ìøת£¨jump£©£ººÍÄ¿±êÀàËÆ£¬²»¹ýËüÖ¸¶¨µÄ²»ÊÇÒ»¸ö¾ßÌåµÄ¶¯×÷£¬¶øÊÇÁíÒ»¸öÁ´£¬±íʾҪÌøתµ½ÄǸöÁ´ÉÏ¡£
¹æÔò£¨rule£©£ºÒ»¸ö»ò¶à¸öÆ¥Åä¼°Æä¶ÔÓ¦µÄÄ¿±ê¡£
Á´£¨chain£©£ºÃ¿ÌõÁ´¶¼°üº¬ÓÐһϵÁеĹæÔò£¬ÕâЩ¹æÔò»á±»ÒÀ´ÎÓ¦Óõ½Ã¿¸ö±éÀú¸ÃÁ´µÄÊý¾Ý°üÉÏ¡£Ã¿¸öÁ´¶¼Óи÷×ÔרÃŵÄÓÃ;£¬
ÕâÒ»µãÎÒÃÇÏÂÃæ»áÏêϸÌÖÂÛ¡£
±í £¨table£©£ºÃ¿¸ö±í°üº¬ÓÐÈô¸É¸ö²»Í¬µÄÁ´£¬±ÈÈç filter ±íĬÈÏ°üº¬ÓÐ INPUT£¬FORWARD£¬OUTPUT
Èý¸öÁ´¡£iptables
ÓÐËĸö±í£¬·Ö±ðÊÇ£ºraw£¬nat£¬mangleºÍfilter£¬Ã¿¸ö±í¶¼ÓÐ×Ô¼º×¨ÃŵÄÓô¦£¬±ÈÈç×î³£ÓÃfilter±í¾ÍÊÇרÃÅÓÃÀ´×ö°ü¹ýÂ˵ģ¬¶ø
nat ±íÊÇרÃÅÓÃÀ´×öNATµÄ¡£
²ßÂÔ£¨police£©£ºÎÒÃÇÔÚÕâÀïÌáµ½µÄ²ßÂÔÊÇÖ¸£¬¶ÔÓÚ iptables ÖÐijÌõÁ´£¬µ±ËùÓйæÔò¶¼Æ¥Åä²»³É¹¦Ê±ÆäĬÈϵĴ¦Àí¶¯×÷¡£
Á¬½Ó¸ú×Ù£¨connection
track£©£ºÓÖ³ÆΪ¶¯Ì¬¹ýÂË£¬¿ÉÒÔ¸ù¾ÝÖ¸¶¨Á¬½ÓµÄ״̬½øÐÐһЩÊʵ±µÄ¹ýÂË£¬ÊÇÒ»¸öºÜÇ¿´óµÄ¹¦ÄÜ£¬µ«Í¬Ê±Ò²±È½ÏÏûºÄÄÚ´æ×ÊÔ´¡£
iptables ½éÉÜ
iptables µÄ±íºÍÁ´£º
ÏÖÔÚ£¬ÈÃÎÒÃÇ¿´¿´µ±Ò»¸öÊý¾Ý°üµ½´ïʱËüÊÇÔõôÒÀ´Î´©¹ý¸÷¸öÁ´ºÍ±íµÄ¡£»ù±¾²½ÖèÈçÏ£º
1. Êý¾Ý°üµ½´ïÍøÂç½Ó¿Ú£¬±ÈÈç eth0¡£
2. ½øÈë raw ±íµÄ PREROUTING Á´£¬Õâ¸öÁ´µÄ×÷ÓÃÊǸÏÔÚÁ¬½Ó¸ú×Ù֮ǰ´¦ÀíÊý¾Ý°ü¡£
3. Èç¹û½øÐÐÁËÁ¬½Ó¸ú×Ù£¬ÔÚ´Ë´¦Àí¡£
4. ½øÈë mangle ±íµÄ PREROUTING Á´£¬ÔÚ´Ë¿ÉÒÔÐÞ¸ÄÊý¾Ý°ü£¬±ÈÈç TOS µÈ¡£
5. ½øÈë nat ±íµÄ PREROUTING Á´£¬¿ÉÒÔÔÚ´Ë×öDNAT£¬µ«²»Òª×ö¹ýÂË¡£
6. ¾ö¶¨Â·ÓÉ£¬¿´Êǽ»¸ø±¾µØÖ÷»ú»¹ÊÇת·¢¸øÆäËüÖ÷»ú¡£
µ½ÁËÕâÀïÎÒÃǾ͵÷ÖÁ½ÖÖ²»Í¬µÄÇé¿ö½øÐÐÌÖÂÛÁË£¬Ò»ÖÖÇé¿ö¾ÍÊÇÊý¾Ý°üҪת·¢¸øÆäËüÖ÷»ú£¬ÕâʱºòËü»áÒÀ´Î¾­¹ý£º
7. ½øÈë mangle ±íµÄ FORWARD
Á´£¬ÕâÀïÒ²±È½ÏÌØÊ⣬ÕâÊÇÔÚµÚÒ»´Î·Óɾö¶¨Ö®ºó£¬ÔÚ½øÐÐ×îºóµÄ·Óɾö¶¨Ö®Ç°£¬ÎÒÃÇÈÔÈ»¿ÉÒÔ¶ÔÊý¾Ý°ü½øÐÐijЩÐ޸ġ£
8. ½øÈë filter ±íµÄ FORWARD
Á´£¬ÔÚÕ


Ïà¹ØÎĵµ£º

½â¾ölinuxÎÞ·¨Ò»´Îɾ³ýÐí¶àÎļþµÄÎÊÌâ


ÔÚlinuxÏÂÒ»Ö±±»ÎÞ·¨Ò»ÏÂɾ³ýºÜ¶àÎļþ£¨³¬¹ý1024£©µÄÎÊÌâÀ§ÈÅ£»½ñÌìÕÒÁËһϣ¬·¢ÏÖÓÐÒ»¸öºÜ¼òµ¥µÄ½â¾ö°ì·¨¡£ÔÚterminalÖÐÊäÈë
flora03:/scratch/weibinli> find . -name 'Rubidium*' | xargs rm
 
¸ÃÃüÁîÒ»ÏÂ×Ó ½«ËùÓÐÒÔRubidium¿ªÍ·µÄÎļþɾ³ýµô¡£ÒÔ´ËÀàÍÆ£¬Ó¦¸Ã¿ÉÒÔ½«rm¸ÄΪcpÒ»´Îcopy´óÊýÄ¿µÄÎļþ¡£
......

CÓïÑÔ±àдlinuxϵÄÊØ»¤½ø³Ì

ÀûÓÃ
ÏÂÔصÄÕâ¶Î´úÂ룬³É¹¦ÊµÏÖÁËÊØ»¤½ø³Ì£¬Ô­À´ÊØ»¤½ø³ÌÊǺܼòµ¥µÄÊÂÇé¡£
¡¡¡¡ÔÚmainº¯ÊýÖÐÖ´ÐÐ
¡¡¡¡init_daemon();//³õʼ»¯ÎªDaemon
¡¡¡¡¾Í¿ÉÒ԰ѽø³Ì±ä³ÉÊØ»¤½ø³Ì
¡¡¡¡
#include
#include
#include
#include
#include
void
 init_daemon(void
)
{
int
 pid;
int
 i;
if
(pid=fork()) ......

linuxÏÂdataguardʹÓÃrman±¸·Ý

oracle dataguardÊÇÖ¸Ò»ÖÖÊý¾Ý¿â¼¶±ðµÄHA·½°¸£¬×îÖ÷ÒªµÄ¹¦ÄÜÊÇÈÝÔÖ£¬Êý¾Ý±£»¤£¬¹ÊÕϻָ´µÈ
ÔÚÉú²úÊý¾Ý¿âµÄÊÂÎñÒ»ÖÂÐÔʱ£¬Ê¹ÓòúÉúµÄÎïÀíÈ«±¸·Ý´´½¨±¸¿â£¬±¸¿âͨ¹ý´«Êä¹ýÀ´µÄ¹éµµÈÕÖ¾×Ô¶¯Î¬»¤±¸ÓÃÊý¾Ý¿â
½«ÖØ×öµÄÊý¾ÝÓ¦Óõ½±¸ÓÿâÉÏ¡£
1£¬Ç°Ì᣺
 primary£º192.168.18.1;
   oracle_SID:db1
  ......

ÔÚLinuxÏÂÅäÖÃjdk»·¾³

Ò»¡¢JDKÏÂÔØ:http://java.sun.comÏÂÔØ×Ô½âѹ°ü:jdk.bin
#sh jdk.bin °´ÌáʾѡÔñyes¡£µ½´ËJDKÒѾ­°²×°Íê³É
¶þ¡¢ÉèÖû·¾³±äÁ¿
¼ÙÈçjdk°²×°µ½ÁË/usrĿ¼Ï¡£ÔÚ/etc/profileÖеÄ×îµ×¶ËÀïдÈëÈçÏÂ:
#vi /etc/profile
#Set Environment by NetSeek (2005/9/5)
export JAVA_HOME=/usr/jdk
export JRE_HOME=/usr/jdk/jre
PA ......

Qt for symbian»·¾³´î½¨£¨Linux£©

Programming your application or library based on Qt has always had the promise that you can deploy your application on many different platforms. Development of those applications can, likewise, happen on many different platforms. QtCreator runs on Windows, Mac & Linux among others.
QtºÜ¼òµ¥£¬Ò× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ