728x90

Fortigate SIP ALG / Fortinet SIP ALG


FortiOS has two features that can modify the SIP headers and SDP parameters. The first feature is called the “SIP Session Helper”. If you are experiencing one way audio issues disable this feature first, reboot your IP phone then try making another call. If disabling the session helper does not work, disable the SIP ALG as well.

 

To disable the sip session helper:

 

1 Enter the following command to find the sip session helper entry in the session-helper list:

 

show system session-helper

edit 10
 set name sip
 set port 5060
 set protocol 17

 

2 Enter the following command to delete session-helper list entry number 10 to disable the sip session helper:

 

config system session-helper
 delete 10

 

To disable the SIP ALG:

 

There are typically two VOIP profiles on a factory shipped Fortinet firewall. You may need to disable both profiles to fully stop the ALG.

 

config voip profile
 edit VoIP_Pro_2
 config sip
 set status disable
 end
 end

 

See the Fortigate Technical documentation page  for further details.

 

 

728x90

'업무이야기 > Security' 카테고리의 다른 글

FortiGate IP MAC Binding  (0) 2015.12.28
Spam Blacklist 확인 사이트  (0) 2015.12.28
Juniper Firewall DHCP Server Configuration  (0) 2013.03.10
Fortigate IPS DoS configuration Sample  (0) 2013.03.10
Fortigate Port Restricted  (0) 2013.03.10
728x90

Juniper Firewall DHCP Server Configuration

 

set interface ethernet0/3 dhcp server service
set interface ethernet0/3 dhcp server enable
set interface ethernet0/3 dhcp server option lease 1440000
set interface ethernet0/3 dhcp server option gateway 172.17.1.1
set interface ethernet0/3 dhcp server option netmask 255.255.255.0
set interface ethernet0/3 dhcp server option dns1 168.126.63.1
set interface ethernet0/3 dhcp server ip 172.17.1.10 to 172.17.1.100
unset interface ethernet0/3 dhcp server config next-server-ip

 

 

 

728x90
728x90

# Fortigate IPS DoS configuration Sample

 

Fortigate $ show ips DoS block_dos
config ips DoS
    edit "block_dos"
            config anomaly
                edit "tcp_syn_flood"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "tcp_port_scan"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "tcp_src_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "tcp_dst_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "udp_flood"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "udp_scan"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "udp_src_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "udp_dst_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "icmp_flood"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "icmp_sweep"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "icmp_src_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "icmp_dst_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "ip_src_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
                edit "ip_dst_session"
                    set status enable
                    set log enable
                    set action block
                    set threshold 100
                next
            end
    next
end


Fortigate $ sh firewall interface-policy
config firewall interface-policy
    edit 1
        set interface "dmz"
            set srcaddr "all"
            set dstaddr "all"
            set service "ANY"
        set ips-DoS-status enable
        set ips-DoS "block_dos"
    next
end

 


## Default

Fortigate # show firewall DoS-policy
config firewall DoS-policy
    edit 2
        set interface "wan1"
        set srcaddr "all"
        set dstaddr "all"
        set service "ALL"
            config anomaly
                edit "tcp_syn_flood"
                    set threshold 2000
                next
                edit "tcp_port_scan"
                    set threshold 1000
                next
                edit "tcp_src_session"
                    set threshold 5000
                next
                edit "tcp_dst_session"
                    set threshold 5000
                next
                edit "udp_flood"
                    set threshold 2000
                next
                edit "udp_scan"
                    set threshold 2000
                next
                edit "udp_src_session"
                    set threshold 5000
                next
                edit "udp_dst_session"
                    set threshold 5000
                next
                edit "icmp_flood"
                    set threshold 250
                next
                edit "icmp_sweep"
                    set threshold 100
                next
                edit "icmp_src_session"
                    set threshold 300
                next
                edit "icmp_dst_session"
                    set threshold 1000
                next
                edit "ip_src_session"
                    set threshold 5000
                next
                edit "ip_dst_session"
                    set threshold 5000
                next
                edit "sctp_flood"
                    set threshold 2000
                next
                edit "sctp_scan"
                    set threshold 1000
                next
                edit "sctp_src_session"
                    set threshold 5000
                next
                edit "sctp_dst_session"
                    set threshold 5000
                next
            end
    next
end

Fortigate #

 

 

728x90
728x90

Fortigate Port Restricted

 

## Dynamic source NAT without changing the source port (one-to-one source NAT)

 

# Problem

Some protocols or services will only function if they use a specific source port, or a source port that does not change. Normally source NAT changes the source port to allow multiple simultaneous sessions.

 

# Solution

You can select the fixed port option to restrict the FortiGate unit to not translate the source port. This results in a one-to-one NAT configuration. One-to-one NAT limits the number of simultaneous sessions that are supported because one variable for tracking sessions (the source port number) is no longer available. To allow more sessions, one-to-one NAT is normally used with multiple external IPs added to an IP pool.

In this example, you enable one-to-one NAT by enabling the fixed port option in a security policy and adding an IP pool containing three IP addresses: 172.20.120.[13-15]. The fixed port option is enabled from the CLI so this entire example is configured from the CLI.

 

1 Enter the following command to add the IP pool:

config firewall ippool

edit Dynamic-Source

set startip 172.20.120.13

set endip 172.20.120.15

end

 

2 Enter the following command to add a security policy that allows users on the private network to access the Internet.

config firewall policy

edit 0

set srcintf internal

set srcaddr all

set dstintf wan1

set dstaddr all

set schedule always

set service ANY

set action accept

set nat enable

set fixedport enable

set ippool enable

set poolname Dynamic-Source

end

 

If you edit this policy from the web‑based manager, you will notice that the Fixed Port option is visible and is selected.

 

 

728x90
728x90

리눅스에서 root 계정의 패스워드를 분실한 경우 보통 싱글모드로 부팅해서 해결을 하는데요, Citrix XenServer에 설치한 리눅스의 경우 GRUB 부팅화면이 나타나지 않더군요. 그래서 저는 일단 DVD로 부팅을 하려고 시도했습니다.


그랬더니 아래와 같은 오류가 뜨면서 부팅이 되지 않았습니다.

WARNING: /dev/xvda is not a disk image - Traceback (most recent call last): - File "/usr/bin/pygrub", line 746, in ? - raise RuntimeError, "Unable to find partition containing kernel" - RuntimeError: Unable to find partition containing kernel


그래서 다른 방법을 찾기 위해 검색을 좀 해보니 OS Boot Parameters에 s를 적어주면 싱글모드로 부팅이 되더군요.



s를 적어주고 부팅을 하니 아래와 같이 싱글모드로 잘 부팅되었습니다.

 

 


패스워드도 잘 복구 하였구요.

 

 


복구한 후에는 다시 OS Boot Parameters에서 s를 빼줘야겠죠?


Citrix XenServer를 하이퍼바이저로 사용하시는 분들이 얼마나 계실지는 모르겠으나, 혹시라도 도움이 될까 싶어 올려둡니다.

 




원문출처 : http://snoopybox.co.kr/1531

 

 

728x90
728x90

리눅스에서는 보통 NFS를 많이 사용하지만, 리눅스와 윈도우 서버를 혼용해서 사용하는 경우 둘 사이에 데이터를 공유하기 위해 CIFS를 사용하는 경우가 많습니다. 왜냐하면 리눅스에서 CIFS를 마운트하는 것은 꽤 쉽지만, 윈도우에서 NFS를 마운트하는 것은 꽤 귀찮기 때문입니다.

CIFS라는 용어는 흔히 SMB, SAMBA 등과 혼용해서 사용하는데 뭐 복잡하게 생각할 것 없이 그냥 윈도우 공유폴더에 사용되는 프로토콜 정도로 생각하시면 편합니다. 최근에 윈도우 서버 2012에서는 SMB 3.0을 선보이기도 했죠.

아무튼 쉽게 말해 윈도우에서 생성한 공유 폴더를 리눅스에 마운트해서 사용하는 방법을 간단히 알아보겠습니다.

mount -t cifs -o user='사용자이름',password='패스워드' //서버주소/공유폴더 마운트경로

사용자 이름 : testuser
패스워드 : 1234
서버주소 : 192.168.0.2
공유폴더 : cifs-test
마운트 경로 : /mount-test

mount -t cifs -o user='testuser',password='1234' //192.168.0.2/cifs-test /mount-test

제 PC에 공유 폴더를 하나 만들고 Hyper-V 리눅스 VM에 마운트 해서 테스트 파일을 생성해 봤는데 잘 되었습니다.

 

 


이상입니다.


원문출처 : http://snoopybox.co.kr/1663

 

 

728x90
728x90

일반적으로 관리자 권한의 CMD 창을 띄우라 하면 이렇게 하실 것입니다.

아래 그림처럼 보조프로그램에 있는 명령 프롬프트에 우클릭 해서 관리자 권한으로 실행하거나

 

 


아니면 시작 메뉴 검색 창에 cmd 입력 후 Ctrl + Shift + Enter 를 입력하는 방법

 

 


그런데 관리자 권한의 CMD 창을 자주 띄우는 편이라면, 작업 표시줄에 아이콘을 고정시켜 두는건 어떨까요? 물론 Administrator 계정을 사용하거나, 저처럼 UAC를 끄고 사용하는 분들의 경우 CMD 창이 항상 관리자 권한으로 실행됩니다만, 보안을 이유로 UAC를 끄지 않고 사용하는 분들에게는 이 방법이 도움이 될 듯 합니다.

우선 CMD 창을 하나 띄운 다음 우클릭 해서 작업 표시줄에 고정시켜주세요.

 

 


그런 다음 CMD 창을 닫고, 작업 표시줄에 고정된 아이콘에 Shift + 우클릭 합니다. 그리고 속성을 눌러주세요.

 

 


그러면 바로가기 탭에 고급 버튼이 하나 보이는데, 눌러주세요.

 

 


고급 속성 창이 뜨면, 관리자 권한으로 실행 부분에 체크를 해줍니다.

 

 


이렇게 하시면 작업 표시줄에 고정시켜둔 CMD 아이콘은 항상 관리자 권한으로 실행됩니다.

 

 

 

 


그런데 이렇게 했을 때 나타나는 기본 경로 C:\Windows\System32 폴더가 불편하지 않으신가요? 뭐 불편하지 않으시다면 제가 할 말은 없습니다만... 만약 불편하시다면 기본 경로를 바꿔봅시다.

왜 불편하냐구요? 짧은 커맨드를 입력할 때는 괜찮은데, 긴 커맨드를 입력해야 하는 경우 다음 줄로 넘어가게 되어 보기에 안 좋더라구요. 물론 CMD 창의 크기 자체를 키워두면 되지만...

아무튼 불편하신 분들은 다음 방법을 활용해봅시다.

아까전에 Shift + 우클릭 해서 속성에 들어갔을 때 보였던 바로가기 탭을 주목해주세요. 대상과 시작 위치가 있는데, 시작 위치를 바꾸면 해결이 될까요? 그렇지 않습니다. 시작 위치는 이미 %HOMEPATH%인데 상관없이 C:\Windows\System32 폴더에서 실행되고 있잖아요. 그래서 제가 CMD 스크립트를 첨부파일과 함께 배포하는 경우 항상 첫 부분에 pushd %~dp0 또는 cd /d %~dp0 를 넣어줍니다. 왜냐하면 UAC가 켜진 사용자가 관리자 권한으로 CMD 스크립트를 실행한 경우 C:\Windows\System32 에서 경로가 시작되기 때문입니다. 그래서 그 경로를 배치파일이 존재하는 위치로 되돌리기 위해서 위 명령어를 스크립트 초반부에 넣습니다.

아무튼 시작 경로를 변경하기 위해서 대상 부분에 다음과 같이 입력해봅시다.

cmd /k cd /d 경로

여기서 cmd 다음에 /k 를 붙이는 이유는 뒤에 나오는 명령을 실행한 뒤 CMD 창을 계속 남아있도록 하기 위함이고, cd 뒤에 /d 를 붙이는 이유는 대상 드라이브가 현재 드라이브와 다른 경우 경로 드라이브 이동이 되지 않기 때문입니다. 즉 C:\Windows\System32 경로가 기본으로 뜨는 상태인데 cd D:\ 하시면 바뀌지 않습니다. cd /d D:\ 해야 바뀝니다.

저는 위에 아무것도 안 나오게, 최대한 깔끔하게 하려고 C 드라이브 루트로 경로를 지정합니다.

cmd /k cd /d C:\

(참고로 이동 대상 경로가 드라이브 루트인 경우 cd /d 없이 바로 cmd /k C: 라고 입력해도 됩니다.)

 

 

 

 


위에 버전도 안 뜨고, 바로 C 드라이브 루트가 뜨니 깔끔하죠?

만약 바탕화면을 경로로 지정하고 싶다면 아래와 같이 입력해보세요.

cmd /k cd %homepath%\desktop

참고로 여기서는 제가 cd 뒤에 /d 옵션을 넣지 않았습니다. 왜냐하면 HOMEPATH 환경변수 자체가 \Users\사용자 폴더를 가리키는데, 특수한 경우가 아니라면 윈도우가 설치된 드라이브와 동일한 드라이브이기 때문입니다. 물론 /d 옵션을 붙인다고 해서 문제될 것은 없습니다만 타이핑을 조금이라도 덜 하려고 /d 옵션은 붙이지 않았습니다.

 

 

 

 


참고로 Administrator 계정을 사용하거나, 저처럼 UAC를 끄고 사용하시는 분들은 위 방법대로 하실 필요가 없습니다. 그냥 시작 위치 부분에 바로 원하는 경로를 넣어버리면 그만입니다.

 

 

 

 



별거 아닌 내용을 가지고 글을 길게 썼는데요, 사실 제가 가장 추천하는 방법은 바로 아래 글입니다.

2010/05/25 - [Windows 7/기타 윈도우 7 이야기] - 마우스 우클릭으로 관리자 권한의 CMD 창 열기

위 글에서 소개해드린 방법을 사용하시면 정말 편리합니다. 언제 어디서든 마우스 우클릭 만으로 해당 위치에 바로 관리자 권한의 CMD 창을 열 수 있습니다. 굳이 작업 표시줄에 아이콘을 고정시켜둘 필요가 없습니다. 특히 다운로드 받은 파일에 옵션 붙여가며 관리자 권한으로 커맨드를 날려야 할 경우 딱 좋습니다. 바탕화면이든 어디든 파일이 있는 곳에서 바로 마우스 우클릭으로 관리자 권한의 CMD 창을 띄울 수 있으니까요.

실컷 써놓고 보니 결국 예전에 올렸던 글을 추천하게 되었는데, 아무튼 작업 표시줄이든 마우스 우클릭이든 각자 취향에 맞고 편하게 느껴지는 방법을 선택하시면 되겠습니다.


원문출처 : http://snoopybox.co.kr/1565

 

728x90
728x90

디스크 관리 => diskmgmt.msc
네트워크 연결 => ncpa.cpl
사용자 계정 => netplwiz.exe
로컬 사용자 및 그룹 => lusrmgr.msc
프로그램 및 기능 => appwiz.cpl
서비스 => services.msc
이벤트 뷰어 => eventvwr.msc
IIS 관리자 => inetmgr.exe
Windows 방화벽 => firewall.cpl
고급 보안이 포함된 Windows 방화벽 => wf.msc
시스템 속성 => sysdm.cpl
원격 데스크톱 => mstsc.exe
장치 관리자 => devmgmt.msc
로컬 그룹 정책 편집기 => gpedit.msc
성능 모니터 => perfmon.msc
컴퓨터 관리 => compmgmt.msc
iSCSI 초기자 => iscsicpl.exe
Active Directory 사용자 및 컴퓨터 => dsa.msc

 

 

728x90

+ Recent posts