
一、配置接口inside、outside
* J/ _/ n$ l. u; m/ Kinterface g0/0- Q! R. ~2 o( G; a! S4 }, X
speed auto% ]1 C& Q: `: L( _2 x" L; g( C4 @5 q
duplex auto! O' P A$ l/ {
nameif inside
; L- T% E0 I! } q; xSecurity-level 100, u9 O% H4 [ F# ]
ip address 192.168.8.1 255.255.0.0
2 e4 V3 R; {- A& S* L& Eno shut+ G+ p0 U$ |8 e, a0 q
exit
/ c# ~) x/ g$ T! _: uinterface g0/3
2 ^. U4 ~' C. x: `8 U. j/ tspeed auto" v8 M7 X: ^1 Z) ^
duplex auto. J' N$ o$ v, H* |& L. Z5 A7 p, ?
nameif outside
+ N' H6 I/ p3 [# T" s, DSecurity-level 09 }' r. s' e! ~- B! ^$ B! ?
ip address 223.82.254.70 255.0.0.0
3 `3 D( j) G" {3 v& v# Sno shut
4 t* `' ^: {. W2 v! vexit
0 y& r/ J3 n/ v4 }- H3 C6 T5 U4 h1 }2 n5 }& i. G/ n7 L
二、添加外网路由2 R0 x6 b3 L/ x. Y- i6 {
route outside 0 0 223.82.254.1
, S- f: r5 @" x9 |5 r! |, }: e0 h三、nat转换,使得内网可以上网. V$ H! |5 U1 }7 g- A
nat-control
' U2 K( J, l4 w$ C' ]* onat (inside) 1 192.168.0.0 255.255.0.0% T! c [5 V2 B x) @2 O
global (outside) 1 interface
8 b( [' l6 E3 T6 L( Q. [& b
" z; F4 x5 }; \四、静态nat,对外网IP的访问转换到inside的服务器
0 X6 C, z+ x$ e- I& B0 |" Zstatic (inside,outside) 223.82.254.71 192.168.8.11 netmask 255.255.255.255 dns
' |7 \! `' ~: Yaccess-list out_inside extended permit tcp any host 223.82.254.71 eq www
! y' x# k! M. @access-group out_inside in interface outside! c. f& G# X [( P6 Q3 s! J
+ j# A k. {5 `请问访问 http://223.82.254.71 是否可以通? 0 [2 e& L- u3 e! B2 L- k% n
|
评分
-
查看全部评分
|