## CentreCOM AR550S 設定例集 2.9
##  194 IPsecルートテンプレート＋OSPFを使用したセンター機器冗長構成
##  ルーターAのコンフィグ
##
## 「#」で始まる行は、コンソールから入力しないと意味を持たないコマンドです。

ADD USER=secoff PASSWORD=PasswordS PRIVILEGE=SECURITYOFFICER
CREATE PPP=0 OVER=eth0-ANY
SET PPP=0 OVER=eth0-ANY USER=userA@isp PASS=isppasswdA LQR=OFF BAP=OFF ECHO=ON
ENABLE IP
ADD IP INT=vlan1 IP=172.16.0.1 MASK=255.255.255.0
ADD IP INT=ppp0 IP=10.10.10.1 MASK=255.255.255.255
ADD IP ROUTE FILTER=1 IP=0.0.0.0 MASK=0.0.0.0 ACTION=EXCLUDE DIRECTION=RECEIVE
ADD IP ROUTE FILTER=2 IP=*.*.*.* MASK=*.*.*.* ACTION=INCLUDE
ADD IP ROU=0.0.0.0 MASK=0.0.0.0 INT=ppp0 NEXT=0.0.0.0
ADD IP DNS INT=ppp0
ENABLE IP DNSRELAY
ENABLE FIREWALL
CREATE FIREWALL POLICY=net
ENABLE FIREWALL POLICY=net ICMP_F=UNREACH,PING
DISABLE FIREWALL POLICY=net IDENTPROXY
ADD FIREWALL POLICY=net INT=vlan1 TYPE=PRIVATE
ADD FIREWALL POLICY=net INT=ppp0 TYPE=PUBLIC
ADD FIREWALL POLICY=net NAT=ENHANCED INT=vlan1 GBLINT=ppp0
ADD FIREWALL POLICY=net RU=1 AC=ALLOW INT=ppp0 PROT=UDP PO=500 GBLPO=500 IP=10.10.10.1 GBLIP=10.10.10.1
ADD FIREWALL POLICY=net RU=2 AC=NONAT INT=ppp0 PROT=ALL IP=172.16.0.1-172.16.3.254 ENCAP=IPSEC
ADD FIREWALL POLICY=net RU=3 AC=NONAT INT=vlan1 PROT=ALL IP=172.16.0.1-172.16.3.254
SET FIREWALL POLICY=net RU=3 REMOTEIP=192.168.10.1-192.168.10.254
ADD FIREWALL POLICY=net RU=4 AC=NONAT INT=vlan1 PROT=ALL IP=192.168.10.1-192.168.10.254
SET FIREWALL POLICY=net RU=4 REMOTEIP=192.168.20.1-192.168.20.254
ADD IP ROUTE TEMPLATE=route-c INT=ppp0 NEXT=0.0.0.0 METRIC2=20
ADD IP ROUTE TEMPLATE=route-d INT=ppp0 NEXT=0.0.0.0 METRIC2=21
# CREATE ENCO KEY=1 TYPE=GENE VALUE="secret-ac"
# CREATE ENCO KEY=2 TYPE=GENE VALUE="secret-ad"
CREATE ISAKMP POLICY=ike_ac PEER=ANY KEY=1 MODE=AGGRESSIVE ENCALG=3DESOUTER HASH=SHA GROUP=2
SET ISAKMP POLICY=ike_ac REMOTEID=vpn_ac SENDN=TRUE SENDD=TRUE
SET ISAKMP POLICY=ike_ac DPDMODE=BOTH DPDIDLE=10 MSGBACK=NONE
CREATE ISAKMP POLICY=ike_ad PEER=ANY KEY=2 MODE=AGGRESSIVE ENCALG=3DESOUTER HASH=SHA GROUP=2
SET ISAKMP POLICY=ike_ad REMOTEID=vpn_ad SENDN=TRUE SENDD=TRUE
SET ISAKMP POLICY=ike_ad DPDMODE=BOTH DPDIDLE=10 MSGBACK=NONE
CREATE IPSEC SAS=1 KEY=ISAKMP PROT=ESP ENC=3DESOUTER HASHA=SHA
CREATE IPSEC BUNDLE=1 KEY=ISAKMP STRING=1
CREATE IPSEC POLICY=isa INT=ppp0 AC=PERMIT LPORT=500 RPORT=500 TRANSPORT=UDP
CREATE IPSEC POLICY=vpn_ac INT=ppp0 AC=IPSEC KEYMAN=ISAKMP BUNDLE=1 PEER=DYNAMIC IPROUTE=route-c
SET IPSEC POLICY=vpn_ac LAD=172.16.0.0 LMA=255.255.252.0 RAD=192.168.10.0 RMA=255.255.255.0
CREATE IPSEC POLICY=vpn_ad INT=ppp0 AC=IPSEC KEYMAN=ISAKMP BUNDLE=1 PEER=DYNAMIC IPROUTE=route-d
SET IPSEC POLICY=vpn_ad LAD=172.16.0.0 LMA=255.255.252.0 RAD=192.168.20.0 RMA=255.255.255.0
CREATE IPSEC POLICY=inet INT=ppp0 AC=PERMIT
ENABLE IPSEC
ENABLE ISAKMP
ENABLE OSPF
ADD OSPF AREA=0.0.0.0
ADD OSPF RANGE=172.16.0.0 MASK=255.255.252.0 AREA=0.0.0.0
ADD OSPF INT=vlan1 AREA=0.0.0.0
SET OSPF ASEXTERNAL=ON
SET OSPF REDISTRIBUTE PROT=STATIC METRIC=ORIGINAL TYPE=2
ENABLE TRIGGER
CREATE TRIGGER=1 INTERFACE=vlan1 EVENT=UP SCRIPT=c1_vlan1_up.scp
CREATE TRIGGER=2 INTERFACE=vlan1 EVENT=DOWN SCRIPT=c1_vlan1_down.scp
# LOGIN secoff
# ENABLE SYSTEM SECURITY_MODE
