国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
IPSec-Tools配置
IPSec-Tools配置
1       介紹
從Linux 2.6內(nèi)核開始,內(nèi)核就自身帶有IPSec模塊,配合IPSec-Tools,能很好的實(shí)現(xiàn)Linux的IPSec功能。
IPSec-Tools主要包含libipsec、setkey、racoon和racoonctl這4個(gè)模塊,setkey主要用于配置SAD(安全關(guān)聯(lián)數(shù)據(jù)庫(kù))和SPD(安全策略數(shù)據(jù)庫(kù)),racoon用于IKE協(xié)商。
本文采用最簡(jiǎn)單的網(wǎng)絡(luò)配置(2臺(tái)PC互聯(lián),操作系統(tǒng)均為:Linux 2.6.27)介紹IPSec-Tools的IKE配置和手工配置實(shí)現(xiàn)傳輸模式的IPSec。
默認(rèn)情況下,IPSec-Tools的配置文件均放在/etc/racoon目錄下,setkey.conf文件保存著sad和spd的配置信息,racoon.conf文件保存著IKE各個(gè)協(xié)商階段各采用什么方式進(jìn)行協(xié)商。
2       拓?fù)鋱D
3       IKE配置
1)        采用預(yù)共享密鑰的方式,在/etc/racoon目錄下產(chǎn)生psk.txt的文件;
在A機(jī)的psk.txt里填入:192.168.59.133  mekmitasdigoat。
在B機(jī)的psk.txt里填入:192.168.59.132  mekmitasdigoat。
產(chǎn)生psk.txt文件后,執(zhí)行:chmod 600 psk.txt.
2)        打開setkey.conf文件:
A機(jī)填入:
flush;
spdflush;
spdadd 192.168.59.132 192.168.59.133 any -P out ipsec esp/transport//require;
spdadd 192.168.59.133 192.168.59.132 any -P in ipsec esp/transport//require;
B機(jī)填入:
  flush;
spdflush;
spdadd 192.168.59.132 192.168.59.133 any -P in ipsec esp/transport//require;
spdadd 192.168.59.133 192.168.59.132 any -P out ipsec esp/transport//require;
 
3)        打開A、B兩機(jī)的racoon.conf文件,均填寫以下內(nèi)容:
path include "/etc/racoon";                                     #配置文件位置
path pre_shared_key "/etc/racoon/psk.txt";                  #共享密鑰文件
path certificate "/etc/racoon/cert";                                 #證書文件目錄
log notify;
 
# "padding" defines some parameter of padding.  You should not touch these.
padding
{
      maximum_length 20;    # maximum padding length.
      randomize off;              # enable randomize length.
      strict_check off;    # enable strict check.
      exclusive_tail off;  # extract last one octet.
}
 
# if no listen directive is specified, racoon will listen to all
# available interface addresses.
listen
{
      #isakmp ::1 [7000];
      #isakmp 202.249.11.124 [500];
      #admin [7002];            # administrative's port by kmpstat.
      #strict_address;   # required all addresses must be bound.
      adminsock "/var/run/racoon/racoon.sock" "root" "users" 660;
}
 
# Specification of default various timer.
timer
{
      # These value can be changed per remote node.
      counter 5;             # maximum trying count to send.
      interval 20 sec;     # maximum interval to resend.
      persend 1;            # the number of packets per a send.
 
      # timer for waiting to complete each phase.
      phase1 30 sec;
      phase2 15 sec;
}
 
remote anonymous                   #階段一協(xié)商
{
     
         exchange_mode main;    #main:主模式,aggressive:野蠻模式
             lifetime time 24 hour;
             proposal {
                     encryption_algorithm 3des;
                     hash_algorithm sha1;
                     authentication_method pre_shared_key;
                     dh_group 1;
             }
             proposal {
                encryption_algorithm 3des;
                hash_algorithm md5;
                authentication_method pre_shared_key;
                dh_group 1;
        }
        proposal {
                encryption_algorithm 3des;
                hash_algorithm sha1;
                authentication_method pre_shared_key;
                dh_group 1;
        }
        proposal {
                encryption_algorithm 3des;
                hash_algorithm md5;
                authentication_method pre_shared_key;
                dh_group 1;
        }
        proposal {
                encryption_algorithm 3des;
                hash_algorithm sha1;
                authentication_method pre_shared_key;
                dh_group 1;
        }
       
}
 
sainfo anonymous                                                 #階段二協(xié)商
{
             pfs_group 2;
             lifetime time 12 hour ;
             encryption_algorithm 3des;
             authentication_algorithm hmac_sha1;
             compression_algorithm deflate ;
}
 
4)        執(zhí)行/usr/sbin/racoon -f /etc/racoon/racoon.conf,運(yùn)行IKE協(xié)商程序;
5)        A機(jī)執(zhí)行ping B機(jī),在中間轉(zhuǎn)包可以看到IKE協(xié)商包,協(xié)商完成以后會(huì)出現(xiàn)ESP包,并且能夠ping通。
 
4 手工配置
1)        Setkey.conf設(shè)置:
在A機(jī)的setkey.conf中填入:
flush;
spdflush;
 
add 192.168.59.132 192.168.59.133 esp 24501 -E 3des-cbc "123456789012123456789012";
add 192.168.59.133 192.168.59.132 esp 24502 -E 3des-cbc "123456789012123456789012";
spdadd 192.168.59.132 192.168.59.133 any -P out ipsec esp/transport//require;
spdadd 192.168.59.133 192.168.59.132 any -P in ipsec esp/transport//require;
在B機(jī)的setkey.conf中填入:
flush;
spdflush;
 
add 192.168.59.132 192.168.59.133 esp 24501 -E 3des-cbc "123456789012123456789012";
add 192.168.59.133 192.168.59.132 esp 24502 -E 3des-cbc "123456789012123456789012";
spdadd 192.168.59.132 192.168.59.133 any -P in ipsec esp/transport//require;
spdadd 192.168.59.133 192.168.59.132 any -P out ipsec esp/transport//require;
2)        執(zhí)行setkey –f /etc/raccoon/setkey.conf;
3)        A機(jī)執(zhí)行ping B機(jī),在中間轉(zhuǎn)包可以看到ESP包,并且能夠ping通。
5 其它
Setkey –D:查看SAD信息;
Setkey –DP:查看SPD信息。
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
IPsec 網(wǎng)絡(luò)到網(wǎng)絡(luò)配置
Ipsec 的SPD和SAP詳解
IPSec基礎(chǔ)
基于L2tp/IPSec的VPN環(huán)境搭建
^_^PSK擴(kuò)香
L2TP/IPSec一鍵安裝腳本 | 秋水逸冰
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服