mikrotik/IPSec Dynamic End points Updater.rsc
# IPSec Peer/Policy Updater for Dynamic WAN addresses
# ==================================================
# CONFIGURATION START
# ==================================================
:local localfqdn "local.fqdn-or-ip.domain.tld"
:local remotefqdn "remote.fqdn-or-ip.domain.tld"
:local peertag "peer-comment"
:local policytag "policy-comment"
# ==================================================
# CONFIGURATION END
# ==================================================
/ip dns cache flush
:local localsite "0.0.0.0"
:local remotesite "0.0.0.0"
:if ( [ :tostr [ :toip $localfqdn ] ] != $localfqdn ) do={
:set localsite [ :resolve $localfqdn ]
} else={
:set localsite $localfqdn
}
:if ( [ :tostr [ :toip $remotefqdn ] ] != $remotefqdn ) do={
:set remotesite [ :resolve $remotefqdn ]
} else={
:set remotesite $remotefqdn
}
:log info ( "IPSec: setting local to ". $localsite ." and remote to ". $remotesite ."." )
/ip ipsec policy set [ /ip ipsec policy find comment="$policytag" ] sa-src-address=$localsite sa-dst-address=$remotesite
/ip ipsec peer set [ /ip ipsec peer find comment="$peertag" ] address="$remotesite/32"
# ==================================================
# END OF SCRIPT
# ==================================================
mikrotik/IPSec Dynamic End points Updater.rsc的更多相关文章
- netsh导入导出IPSec配置策略
首先提一句: ipsec规则中,filter action为允许的比拒绝的优先级要高,其它的没有顺序关系,经测试验证! 参考:http://tech.techweb.com.cn/thread-354 ...
- [No0000F2]ip安全监视器
IPSec快速式策略 @echo off :again set num= set fastpolicyname= set issoft= set livetime= set fps= setlocal ...
- Memory Layout (Virtual address space of a C process)
Memory Layout (Virtual address space of a C process) 分类: C语言基础2012-12-06 23:16 2174人阅读 评论(0) 收藏 举报 f ...
- geeksforgeeks@ Minimum Points To Reach Destination (Dynamic Programming)
http://www.practice.geeksforgeeks.org/problem-page.php?pid=91 Minimum Points To Reach Destination Gi ...
- RouterOS的MikroTik脚本从DNS更新IPSEC端的IP地址
#Script for changing IPSEC address when DNS changes. #Script will iterate through all peers looking ...
- Reducing Snapshots to Points: A Visual Analytics Approach to Dynamic Network Exploration
---恢复内容开始--- 分析静态网络的方法:(1)节点链接图 (2)可视化邻接矩阵 and(3)hierarchical edge bundles. 分析网络演变的方法:(1)时间到时间的映射和(2 ...
- AIX上通过IPSEC进行IP包过滤
AIX上的IPSEC 在AIX可以通过以下步骤打开IP Security smitty ipsec4 --> Start/Stop IP Security --> Start IP Sec ...
- Pointers and Dynamic Allocation of Memory
METHOD 1: Consider the case where we do not know the number of elements in each row at compile time, ...
- Linux Programe/Dynamic Shared Library Entry/Exit Point && Glibc Entry Point/Function
目录 . 引言 . C/C++运行库 . 静态Glibc && 可执行文件 入口/终止函数 . 动态Glibc && 可执行文件 入口/终止函数 . 静态Glibc & ...
随机推荐
- android refbase类
在Android的源代码中,经常会看到形如:sp<xxx>.wp<xxx>这样的类型定义,这其实是Android中的智能 指针.智能指针是C++中的一个概念,通过基于引用计数的 ...
- DEDECMS 调用上级栏目标题
在内容页,使用以下代码: {dede:field name='position' runphp='yes'} $tc="-"; //分隔符 $tw=$GLOBALS['cfg_li ...
- umbraco使用VS安装
新建——程序包管理器控制台——install - package umbracocms vs中的快捷键: ctrl+F5为调试: ctrl+shift+B生成解决方案: 打包前,App_data文件夹 ...
- 剑指Offer10 打印1到最大n位数
/************************************************************************* > File Name: 10_PrintT ...
- Linux公社资料库地址
免费下载地址在 http://linux.linuxidc.com/用户名与密码都是http://www.linuxidc.com
- AIX学习笔记(更新中)
AIX操作系统基本命令 系统的进入和退出login: 输入用户名(例如:user01)password: 输入用户口令若用户名及口令均正确,则用户将登陆成功.此时系统会出现命令提示符 $或#,即表示可 ...
- Oracle数据库作业-3 查询
1. 查询Student表中的所有记录的Sname.Ssex和Class列.
- UI设计之PS界面初始化设置
一.PS界面初始化 1.新建设置 web设计的基础标准:宽度为1920px,高度自定义,分辨率72px,背景模式RGB 8位.(提示:可以“存为预设”以便以后直接调用) 注意:背景内容为透明!!! ...
- Log4net记录日志存库并存本地
<?xml version="1.0" encoding="utf-8"?> <configuration> <configSec ...
- PAT (Basic Level) Practise (中文)1027. 打印沙漏(20)
1027. 打印沙漏(20) 时间限制 200 ms 内存限制 32000 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 本题要求你写个程序把给定的符号打印成 ...