728x90
반응형

기존에 주니퍼 외부 아이피의 80, 443 포트를 내부 서버로 포트포워딩 하고 있었다.

 

[edit]
root@SRX340# show security nat destination
pool 192_168_2_2_443 {
    address 192.168.2.2/32 port 443;
}
pool 192_168_2_2_80 {
    address 192.168.2.2/32 port 80;
}
rule-set nsw_destnat {
    from zone Internet;
    rule 0_Web_Server--DMZ_443 {
        match {
            source-address 0.0.0.0/0;
            destination-address 0.0.0.0/0;
            destination-port {
                443;
            }
        }
        then {
            destination-nat {
                pool {
                    192_168_2_2_443;
                }
            }
        }
    }
    rule 0_Web_Server--DMZ_80 {
        match {
            source-address 0.0.0.0/0;
            destination-address 0.0.0.0/0;
            destination-port {
                80;
            }
        }
        then {
            destination-nat {
                pool {
                    192_168_2_2_80;
                }
            }
        }
    }
}

 

이것을

80->81

443-> 444

로 변경하였다.

 

방법을 얘기하자면 변경하려고 하는 포트를 set 명령으로 추가하고 기존 포트를 delete 명령으로 삭제해 주면된다.

 



root@SRX340> edit
Entering configuration mode
The configuration has been changed but not committed

root@SRX340> configure
Entering configuration mode
The configuration has been changed but not committed

root@SRX340# edit security nat destination
root@SRX340# set rule-set nsw_destnat rule 0_Web_Server--DMZ_443 match destination-port 444

[edit security nat destination]
root@SRX340# delete rule-set nsw_destnat rule 0_Web_Server--DMZ_443 match destination-port 443

[edit security nat destination]
root@SRX340# set rule-set nsw_destnat rule 0_Web_Server--DMZ_80 match destination-port 81

[edit security nat destination]
root@SRX340# delete rule-set nsw_destnat rule 0_Web_Server--DMZ_80 match destination-port 80

[edit security nat destination]
root@SRX340# commit check
configuration check succeeds

[edit security nat destination]
root@SRX340# commit
commit complete

[edit security nat destination]
root@SRX340# exit

 

#주니퍼 #포트포워딩 #환경설정수정 #Juniper #PortForwarding #SRX340

728x90
SMALL
Posted by gromet

블로그 이미지
나는 운이 좋은 사람이다 나는 나날이 점점 더 좋아진다 내가 하는 선택과 행동은 반드시 성공으로 이어진다 내게는 인내력과 지속력이 있다 네게는 좋은것들만 모여든다
gromet

공지사항

Yesterday
Today
Total
반응형

달력

 « |  » 2024.7
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함

160x600