hostname 이름적기 ! username 관리계정명 privilege 15 password 패스워드 ! clock timezone KST 9 ! ntp server time.bora.net ! config history 32 ! 로그 설정 - 메모리 로그는 기본설정으로 들어가 있음 - 파일로 로그를 남기는 것은 설정해야 함 ! logging file all ! 로그 수집 ! security parameters offloading logging all logging firewall default-drop routing-drop accounting all ! ! line vty telnet port 2333 ssh port 2233 http secure-port 4433 http multi-login login server priority local ! 인터페이스에 세큐리티 존을 선언해야 방화벽 정책을 넣을수 있다. ! interface eth0 ip add security-zone trust no sh ! interface eth1 ip add security-zone untrust no sh ! 방화벽 정책 - from 출발지ZONE to 목적지ZONE (우선순위값) (id는 정책id) - id는 입력되지 않는다. ! ip security policy from trust to untrust 10 id 2 label trust -> untrust source any destination any action pass log enable ! 디폴트 라우팅 ! ip route 0.0.0.0/0 eth0 ! 정책기반 라우팅 (스태틱 디폴트 라우팅보다 우선시 된다) - 정책id 9번을 타는 경우 eth1로 라우팅 ! ip route policy 10 security-policy-id 9 eth1 ip route policy 20 security-policy-id 10 eth2 ! SNAT 프로필 생성 ! ip snat profile 100 label 1.0 source 192.168.1.0/24 destination any dynamic auto ! ip snat profile 101 label 0.151~250 source range 192.168.0.151 192.168.0.250 destination any dynamic auto prio 1 ! ip snat profile 102 label 0.2-150 source range 192.168.0.2 192.168.0.150 destination any dynamic auto prio 1 ! 정책에 SNAT 프로필을 적용 - snat-profile 번호 - 정책id9 정책에 SNAT 프로필 101을 적용 ! ip security policy from trust to untrust 30 id 9 source range 192.168.0.151 192.168.0.250 label 905호 destination any snat-profile 101 action pass log enable ! DNAT 프로필 생성 ! ip dnat profile 200 source any destination 111.222.111.222 static 192.168.0.100 prio 1 source any destination 111.222.111.222 static 192.168.0.100 prio 2 source any destination 111.222.111.222 static 192.168.0.100 prio 3 ! 정책에 DNAT 프로필을 적용 - 출발지 any - 목적지 dnat-profile 번호 - 정책id7 정책에 DNAT 프로필 200을 적용 - service tcp 21만 ! ip security policy from untrust to trust 10 id 7 source any destination dnat-profile 200 service proto tcp sport any dport eq 21 action pass log enable ! ipv6 전체차단 ! ipv6 security policy from any to any 10 id 6 source any destination any action drop enable ! DHCP 서버 구성 ! ip dhcp server lease-check arp eth0 ! ip dhcp pool 1011name network 192.168.0.0 255.255.254.0 range 192.168.1.151 192.168.1.250 dns-server 168.126.63.1 1 dns-server 8.8.8.8 2 default-router 192.168.0.1 ! VPN dcube 터널구성 센터 ! security zone vpn ! interface dcb1 description YS_VMS_VPN dcube proto esp dcube key cafe1234 ip address 10.11.0.1/16 dcube source eth0 security-zone vpn no shutdown dcube transform encrypt dcube ike aes128 sha256 ipsec aes128 sha256 ! interface eth0 description WAN ip address 111.222.333.444/27 security-zone untrust no shutdown ! ip security policy from trust to vpn 100 id 2 source any destination any tcp-mss 1398 action pass log enable ! ip security policy from vpn to trust 100 id 3 source any destination any tcp-mss 1398 action pass log enable ! 지사 ! security zone vpn ! interface dcb1 description VPN_TUNNEL dcube proto esp dcube key cafe1234 ip address 10.11.0.8/16 dcube source eth0 dcube destination 111.222.333.444 security-zone vpn no shutdown dcube transform encrypt dcube ike aes128 sha256 ipsec aes128 sha256 ! interface eth0 description WAN ip address dhcp security-zone untrust no shutdown ! ip security policy from trust to vpn 100 id 2 source any destination any tcp-mss 1398 action pass log enable ! ip security policy from vpn to trust 100 id 6 source any destination any tcp-mss 1398 action pass log enable ! terminal monitor ipsec - 모니터링 vpn구축할때 외부로 ping은 나가는데 웹 페이지가 열리지 않는경우 방화벽 정책 옵션쪽에 TCP MSS 값을 1300으로 (기본1500) 본딩구성 eth3,4,5를 1개 아이피로 - 하단 스위치에 3개포트를 사용하지만 1개라인처럼 사용 ! interface eth3 security-zone trust no shutdown ! interface eth4 security-zone trust no shutdown ! interface eth5 security-zone trust no shutdown ! interface bond0 bonding mode 802.3ad ad-select stable lacp-rate slow xmit-hash-policy layer2 bonding slave eth3 bonding slave eth4 bonding slave eth5 ip address 192.168.0.1/23 security-zone trust no shutdown ! 브릿지 구성 eth3,4,5를 같은대역으로 사용 - PC 3대를 eth3,4,5에 연결하는 등에 사용 ! interface eth3 security-zone trust no shutdown ! interface eth4 security-zone trust no shutdown ! interface eth5 security-zone trust no shutdown ! interface bridge1 bridge multi-port bridge port eth3 bridge port eth4 bridge port eth5 ip address 192.168.57.254/24 security-zone trust no shutdown ! 패스워드 리커버리 x86 : AXGATE100, 2000, 4000, 5000, 10000, 20000 1. Serial Cable로 장비연결 후 부팅 시작합니다. 2. 멀티부팅 프롬프트에서 Password Recovery를 선택하여 인증절차 없는 모드로 장비 기동 합니다. 멀티부팅 프롬프트 띄우는법 > 부팅시에 뜨는데 3초 후에 사라짐 화살표 눌러서 Password recovery 로 부팅 3. ID/Password 재설정, 설정 저장 후 장비 재기동 합니다. Firewall# conf t *Firewall (config)# username rootfw privilege 15 password admin12#$ *Firewall (config)# end *Firewall# write Building configuration... [OK] Firewall# reboot Do you want to reboot the system now? (y/n): y OCTEON : AXGATE50, 80, 1000 1. Serial Cable로 장비연결 후 부팅 시작합니다. 2. 부팅시 Ctrl + C 로 Uboot 모드로 진입 3. Uboot 프롬프트에서 run bootrecovery 입력하여 인증절차 없는 모드로 장비 기동 시작합니다. 4. ID/Password 재설정, 설정 저장 후 장비 재기동 합니다.