ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

ros routeros ikev2 ipsec传输模式配置

2020-07-22 19:01:13  阅读:1220  来源: 互联网

标签:name ip ikev2 routeros address interface ros ipsec


客户端配置:

/interface bridge
add name=bridge1-wan
/interface ethernet
set [ find default-name=ether1 ] name=ether1-wan
set [ find default-name=ether2 ] name=ether2-wan
set [ find default-name=ether3 ] name=ether3-wan
set [ find default-name=ether4 ] name=ether4-wan
set [ find default-name=ether5 ] name=ether5-lan
/interface pppoe-client
add disabled=no interface=bridge1-wan name=pppoe-out1 password=123456 user=xxxxxxxx
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec mode-config
add name=cfg1 responder=no
/ip ipsec profile
add enc-algorithm=aes-256 hash-algorithm=sha256 name=ikev2-profile1
/ip ipsec peer
add address=x.x.x.x/32 exchange-mode=ike2 name=ikev2-peer1 profile=ikev2-profile1
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-256-cbc name=ikev2-proposal1 pfs-group=none
/interface bridge port
add bridge=bridge1-wan interface=ether1-wan
add bridge=bridge1-wan interface=ether2-wan
add bridge=bridge1-wan interface=ether3-wan
add bridge=bridge1-wan interface=ether4-wan
/ip address
add address=192.168.90.100/24 interface=ether5-lan network=192.168.90.0
/ip cloud
set update-time=no
/ip dns
set servers=114.114.114.114
/ip firewall nat
add action=accept chain=srcnat dst-address=10.10.2.0/24 src-address=192.168.77.0/24
add action=masquerade chain=srcnat out-interface=pppoe-out1
/ip ipsec identity
add generate-policy=port-strict mode-config=cfg1 peer=ikev2-peer1 secret=12345678
/ip route
add distance=1 gateway=pppoe-out1
add distance=1 dst-address=192.168.0.0/16 gateway=192.168.90.254

 

服务端配置:

/interface ethernet
set [ find default-name=ether1 ] name=ether1-wan
set [ find default-name=ether2 ] name=ether2-lan
/ip ipsec profile
add enc-algorithm=aes-256 hash-algorithm=sha256 name=ikev2-profile1
/ip ipsec peer
add exchange-mode=ike2 name=ikev2-peer1 passive=yes profile=ikev2-profile1 send-initial-contact=no
/ip ipsec proposal
add auth-algorithms=sha256 enc-algorithms=aes-256-cbc name=ikev2-proposal1 pfs-group=none
/ip pool
add name=ikev2-pool ranges=192.168.77.2-192.168.77.254
/ip ipsec mode-config
add address-pool=ikev2-pool address-prefix-length=32 name=cfg1 split-include=10.10.2.0/24 system-dns=no
/ip address
add address=x.x.x.x/28 interface=ether1-wan network=x.x.x.x
add address=10.10.2.100/24 interface=ether2-lan network=10.10.2.0
/ip firewall nat
add action=accept chain=srcnat dst-address=192.168.77.0/24 src-address=10.10.2.0/24
add action=masquerade chain=srcnat out-interface=ether1-wan
/ip ipsec identity
add generate-policy=port-strict mode-config=cfg1 peer=ikev2-peer1 secret=12345678
/ip route
add distance=1 gateway=x.x.x.x
add distance=1 dst-address=192.168.12.0/24 gateway=10.10.2.254

标签:name,ip,ikev2,routeros,address,interface,ros,ipsec
来源: https://www.cnblogs.com/itfat/p/13362595.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有