6
APPENDIX
6.3.3
Using Curl to add a firewall DNAT rule
1
c u r l - - s s l v 3 - k - X P O S T - H " Content - T y p e
:
a p p l i c a t i o n / j s o n " - d ’
{
2
" d e s c r i p t i o n "
:
""
,
3
" d i r e c t i o n "
:
" I N G R E S S "
,
4
" e n a b l e d "
:
t r u e
,
5
" g u i d "
:
" FTP - SERVER - D N A T "
,
6
" l a n I p "
:
" 1 9 2 . 1 6 8 . 2 . 1 0 3 "
,
7
" l a n P o r t E n d "
:
21
,
8
" l a n P o r t S t a r t "
:
20
,
9
" n a m e "
:
" FTP - S E R V E R "
,
10
" p r o t o c o l "
:
" TCP "
,
11
" t y p e "
:
" D N A T "
,
12
" w a n I p "
:
" ANY "
,
13
" w a n M a s k "
:
32
,
14
" w a n P o r t E n d "
:
" 2 1 "
,
15
" w a n P o r t S t a r t "
:
" 2 0 "
16
}
’ h t t p s
:
/ / 1 9 2 . 1 6 8 . 2 . 1 / api / nat ? t o k e n = 2 4 4 2 C B 0 C B 6 0 B 2 E E 9 F 5 A 3 5 D F 5 E D 8 C 3 3
Curl result:
1
{
2
" c o d e "
:
200
,
3
" s t a t u s "
:
" s u c c e s s "
4
}
6.3.4
Using Curl to add a firewall filter rule
1
c u r l - - s s l v 3 - k - X P O S T - H " Content - T y p e
:
a p p l i c a t i o n / j s o n " - d ’
{
2
" a c t i o n "
:
" A C C E P T "
,
3
" d e s c r i p t i o n "
:
""
,
4
" d i r e c t i o n "
:
" I N G R E S S "
,
5
" d s t I p "
:
" 1 9 2 . 1 6 8 . 2 . 1 0 3 "
,
6
" d s t M a s k "
:
32
,
7
" d s t N e t w o r k "
:
""
,
8
" d s t P o r t E n d "
:
21
,
9
" d s t P o r t S t a r t "
:
20
,
10
" e n a b l e d "
:
t r u e
,
11
" n a m e "
:
" FTP - S E R V E R "
,
12
" p r o t o c o l "
:
" TCP "
,
13
" s r c I p "
:
" ANY "
,
14
" s r c M a s k "
:
32
,
15
" s r c M a c "
:
""
,
16
" s r c N e t w o r k "
:
""
,
17
" s r c P o r t E n d "
:
" ANY "
,
18
" s r c P o r t S t a r t "
:
" ANY "
19
}
’ h t t p s
:
/ / 1 9 2 . 1 6 8 . 2 . 1 / api / f i l t e r s ? t o k e n = 2 4 4 2 C B 0 C B 6 0 B 2 E E 9 F 5 A 3 5 D F 5 E D 8 C 3 3
Curl result:
1
{
2
" c o d e "
:
200
,
3
" s t a t u s "
:
" s u c c e s s "
4
}
36
Multi-Tech Systems, Inc. MultiConnect
R
rCell API Developer Guide