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 & ...
随机推荐
- ios-uitableviewcell展开
#import <UIKit/UIKit.h> @interface ZSDHelpCell : UITableViewCell @property (weak, nonatomic) I ...
- Java SE ---类,方法,对象等
1,面向对象程序设计的三大基本特征:继承(Inheritence).封装(Encapsulation).多态(Polymorphism) 2,如何定义类? 修饰符 cla ...
- iOS 下拉刷新 上拉加载实现原理
1.下拉刷新 实现原理 if (scrollView.contentOffset.y < -100) { [UIView animateWithDuration:1.0 animations:^ ...
- c#代码使用ResourceDictionary样式
对于ResourceDictionary样式代码: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006 ...
- Shell学习笔记 - 环境变量配置文件
一.source命令 功能:在当前bash环境下读取并执行配置文件中的命令 1. 命令格式 source 配置文件 或 . 配置文件 2. 命令示例 [root@localhost ~]# sou ...
- AIX学习笔记(更新中)
AIX操作系统基本命令 系统的进入和退出login: 输入用户名(例如:user01)password: 输入用户口令若用户名及口令均正确,则用户将登陆成功.此时系统会出现命令提示符 $或#,即表示可 ...
- 5059 一起去打CS
5059 一起去打CS 时间限制: 1 s 空间限制: 32000 KB 题目等级 : 钻石 Diamond 题解 查看运行结果 题目描述 Description 早就和lyk约好了去 ...
- The Art of Computer Programming
<计算机程序设计艺术>即<The Art of Computer Programming>是计算机领域里颠峰级的里程碑,加上国外人士对它的推崇,所以提起它的大名简直就象法律书籍 ...
- Part 7Handling events in AngularJS
Let us understand with an example. Here is what we want to do. 1. Display the list of technologies i ...
- MySQL写入插入数据优化配置
*innodb_buffer_pool_size 如果用Innodb,那么这是一个重要变量.相对于MyISAM来说,Innodb对于buffer size更敏感.MySIAM可能对于大数据量使用默认的 ...