Fortigate CLI Commands - Address(주소 객체) 생성

- Address 생성

#config vdom    
#edit Vdom명  
#config firewall address
#edit Address명     - Address 이름 생성 시 주석을 같이 써주는 것이 좋다.
#set subnet IP주소/subnet   - subnet 생략 시 생성되지 않으므로 주의
#next / #end  - 연속 추가 생성은 next, 저장하면서 상단으로 빠져나가기는 end

예시)
FW#config vdom
FW(vdom)#edit TEST_vdom
FW(TEST_vdom)#config firewall address
FW(address)#edit 100.1.1.1_test
FW(100.1.1.1_test)#set subnet 100.1.1.1/32
FW#end

 

 

Fortigate CLI Commands - Address Group(객체 그룹) 생성 및 멤버 설정

- Address Group 생성 및 멤버 설정

#config vdom    
#edit Vdom명  
#config firewall addrgrp
#edit Address그룹명     - Address그룹 이름 생성 시 자세한 설명 같이 사용
#set member Address명   - IP주소가 아닌 Address명을 멤버로 설정
#append member Address명 - 최초 멤버는 set 사용, 추가 member 등록은 append 사용
#end  - 저장하면서 상단으로 빠져나가기는 end

예시)
FW#config vdom
FW(vdom)#edit TEST_vdom
FW(TEST_vdom)#config firewall addrgrp
FW(addrgrp)#edit AddressGroup_test_1
FW(AddressGroup_test_1)#set member A_100.1.1.1/32
FW(AddressGroup_test_1)#append member B_100.1.1.2/32
FW#end

@주의사항
- 그룹을 만드는 경우는 member가 많아서 한 번에 묶기위한 작업이므로 무조건 2개 이상이 설정되는데, 처음 멤버는 무조건 set, 두 번째 멤버부터는 append 명령어를 사용해야합니다. set 으로 밀어넣으면 마지막 명령어의 주소 객체만 포함됩니다.

 

 

Fortigate CLI Commands - Service Port(서비스 포트) 생성

- Service Port 생성

#config vdom    
#edit Vdom명  
#config firewall service custom
#edit Port_Name  - 생성시 포트 종류와 포트번호를 같이 맵핑하는 것을 추천
#set category General - 일반적인 포트는 General 카테고리에 넣어서 사용(당연히 카테고리도 개별 생성 가능)
#set tcp-portrange Port -포트 한개만 설정 시, range가 아닌 최소값 하나만 설정해도 가능(범위 설정은 최소값 - 최대값 )
#next / end  - 연속된 저장은 next, 저장하면서 상단으로 빠져나가기는 end

#set 옵션은 아래에서 확인


예시)
FW#config vdom
FW(vdom)#edit TEST_vdom
FW(TEST_vdom)#config firewall service custom
FW(custom)#edit Test_Port_8999
FW(Test_Port_8999)#set category Gengeral
FW(Test_Port_8999)#set tcp-portrange 8999
FW#end

# set 옵션
- proxy : Enable/disable web proxy service
- category : Service category
- protocol : Protocol type based on IANA numbers
- iprange : Start and end of the IP range associated with service
- fqdn : Fully qualified domain name
- tcp-portrange : Multiple TCP port ranges
- udp-portrange : Multiple UCP port ranges
- sctp-portrange : Multiple SCTP port ranges
- tcp-halfclose-timer : Wait time to close a TCP session waiting for an unanswered FIN packet( 1-86400 sec , 0 = default)
- tcp-halfopen-timer : Wait time to close a TCP session waiting for an unanswered open session packet( 1-86400 sec , 0 = default)
- tcp-timewait-timer : Set the length of the TCP TIME-WAIT state in seconds ( 1 - 300 sec, 0 = default)
- udp-idle-timer : UDP half close timeout ( 0 - 86400 sec, 0  = default )
- session-ttl : Session TTL ( 300 - 604800, 0 = default)
- check-rest-range : Configure the type of ICMP error message verifiation
- comment : comment
- color : Color of icon of the GUI
- visibility : Enable/disable the visibility of the service of the GUI

 

 

Fortigate CLI Commands - Service Group(서비스 그룹) 생성 및 멤버 추가

 

- Service Group 생성 및 멤버 추가

#config vdom    
#edit Vdom명  
#config firewall service group
#edit Group_Name  - Policy 생성 시, 해당 정책과 관련된 명칭으로 설정
#set member Port_Name
#append member Port_Name  
#end  -저장하면서 상단으로 빠져나가기는 end

* set 옵션은 아래에서 확인

예시)
FW#config vdom
FW(vdom)#edit TEST_vdom
FW(TEST_vdom)#config firewall service group
FW(group)#edit TEST_Port_Group
FW(TEST_Port_Group)#set member tcp_12344
FW(TEST_Port_Group)#append member tcp_22334
FW#end

# set 옵션
- member : Service objects contained within the group
- proxy : Enable/disable web proxy group
- comment : comment
- color : Color of icon of the GUI

@확인사항
- Service Group을 만들게 되면 Categroy는 Firewall Group에 자동 등록이 된다.

 

 

Fortigate CLI Commands - Schedule(스케줄) 생성

- Schedule 생성

#config vdom    
#edit Vdom명  
#config firewall schedule onetime
#edit Schedule_Name  - 날짜명으로 생성
#set start >hh:mm yyyy/mm/dd - 시:분 년/월/일
#set end hh:mm yyyy/mm/dd
#set expiraion-days Number - 스케줄 만료 전에 이벤트 로그 메시지 일정
#next / end  - 연속된 저장은 next, 저장/상단나가기 end



* schedule/set 옵션은 아래에서 확인

예시)
FW#config vdom
FW(vdom)#edit TEST_vdom
FW(TEST_vdom)#config firewall schedule onetime
FW(onetime)#edit 20241230
FW(20241230)#set start 00:00 2024/01/01
FW(20241230)#set end 00:00 2024/12/31
FW(20241230)#set expiration-days 5
FW#end

* schedule 옵션
- group : Schedule group configuration  ( 스케줄 그룹 생성 )
- onetime : Onetime schedule configuration ( 특정 날짜로 스케줄 생성 )
- recurring : Recurring schedule configuration ( 요일별로 반복적인 스케줄 생성 )

* set 옵션
- start : Schedule start date and time, format hh:mm yyyy/mm/dd
- end : Schedule end date and time, format hh:mm yyyy/mm/dd
- color : Color of icon on the GUI
- expiration-days : Write an event log message this many days before the schedule expires.

* set start
<time&date> Syntax: <hh:mm> <yyyy/mm/dd> (year range : 2001-2050)

* set expiration-days
- Enter an integer value from <0> to <100> (default =<3>)