PDA

View Full Version : VPN Trouble



Vuongxibul
05-06-2003, 05:43 PM
Chao moi nguoi! :oops:
co ai biet lam cach nao cho VPN client pass through NAT/PAT khong? chi cho tui voi.
Cuu mang gap gap gium tui.

Cam on nhieu.

:D

sinhvienngheo
06-06-2003, 02:30 AM
Hi,

bạn có thể cấu hình địa chỉ của các VPN client sao cho nó sẽ không bị NAT. Nói cách khác, mọi thứ sẽ bị NAT, ngoài trừ địa chỉ của VPN clients.

TGA_Certificationteam
06-06-2003, 03:35 AM
VPN NAT

Mọi thứ ( Ngoại trừ Traffic cần đi vào VPN ) sẽ bị NAT - thay đổi Header , đổi IP source và lưu session lại

Các thứ còn lại (VPN traffic) thay không bị NAT , mà sẽ được Encrypt (kể cả Header) , sau đó 1 header (địa chỉ source , dest của VPN) mới sẽ được add vào trong gói tin củ (đã được mả hoá kể cả header), toàn header cũ sẽ trở thành Payload của gói tin mới và được gởi đi qua Internet.

dangquangminh
06-06-2003, 04:29 PM
đây là một cấu hình mẫu từ Cisco. chú ý option NONAT khi định nghĩa nat translation.

thân mến,
Minh

hostname Light
!
!
ip subnet-zero

!--- IPSec Internet Security Association and Key Management Protocol (ISAKMP) policy.

crypto isakmp policy 5
hash md5
authentication pre-share


!--- ISAKMP key for static LAN-to-LAN tunnel without extended authenticaton (xauth).

crypto isakmp key cisco123 address 10.64.10.45 no-xauth


!--- ISAKMP key for dynamic VPN Client.

crypto isakmp key 123cisco address 0.0.0.0 0.0.0.0


!--- Assign IP address to the VPN Client.

crypto isakmp client configuration address-pool local test-pool
!
!
!
crypto ipsec transform-set testset esp-des esp-md5-hmac
!
crypto dynamic-map test-dynamic 10
set transform-set testset
!
!

!--- VPN Client mode configuration negotiation, such as IP address assignment and xauth.

crypto map test client configuration address initiate
crypto map test client configuration address respond


!--- Static crypto map for the LAN-to-LAN tunnel.

crypto map test 5 ipsec-isakmp
set peer 10.64.10.45
set transform-set testset


!--- Include the private network-to-private network traffic in the encryption process.

match address 115


!--- Dynamic crypto map for the VPN Client.

crypto map test 10 ipsec-isakmp dynamic test-dynamic
!
!
interface FastEthernet0/0
ip address 10.64.10.44 255.255.255.224
ip nat outside
duplex auto
speed auto
crypto map test
!
interface FastEthernet0/1
ip address 192.168.100.1 255.255.255.0
ip nat inside
duplex auto
speed auto

!--- Define IP address pool for the VPN Client.

ip local pool test-pool 192.168.1.1 192.168.1.254


!--- Except the private network and VPN Client traffic from the NAT process.

ip nat inside source route-map nonat interface FastEthernet0/0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 10.64.10.33

!--- Except the private network and VPN Client traffic from the NAT process.

access-list 110 deny ip 192.168.100.0 0.0.0.255 192.168.200.0 0.0.0.255
access-list 110 deny ip 192.168.100.0 0.0.0.255 192.168.1.0 0.0.0.255
access-list 110 permit ip 192.168.100.0 0.0.0.255 any


!--- Include the private network to private network traffic in the encryption process.

access-list 115 permit ip 192.168.100.0 0.0.0.255 192.168.200.0 0.0.0.255
!


!--- Except the private network and VPN Client traffic from the NAT process.

route-map nonat permit 10
match ip address 110
!
end


House Configuration

hostname house
!
!--- IPSec ISAKMP policy.

crypto isakmp policy 5
hash md5
authentication pre-share


!--- ISAKMP key for static LAN-to-LAN tunnel without xauth authenticaton.

crypto isakmp key cisco123 address 10.64.10.44 no-xauth
!
!
crypto ipsec transform-set testset esp-des esp-md5-hmac
!


!--- Static crypto map for the LAN-to-LAN tunnel.

crypto map test 5 ipsec-isakmp
set peer 10.64.10.44
set transform-set testset


!--- Include the private network-to-private network traffic in the encryption process.

match address 115
!
call rsvp-sync
cns event-service server

interface FastEthernet0/0
ip address 10.64.10.45 255.255.255.224
ip nat outside
duplex auto
speed auto
crypto map test
!
interface FastEthernet0/1
ip address 192.168.200.1 255.255.255.0
ip nat inside
duplex auto
speed auto

!--- Except the private network traffic from the NAT process.

ip nat inside source route-map nonat interface FastEthernet0/0 overload
ip classless
ip route 0.0.0.0 0.0.0.0 10.64.10.33
no ip http server
ip pim bidir-enable
!

!--- Except the private network traffic from the NAT process.

access-list 110 deny ip 192.168.200.0 0.0.0.255 192.168.100.0 0.0.0.255
access-list 110 permit ip 192.168.200.0 0.0.0.255 any

!--- Include the private network-to-private network traffic in the encryption process.

access-list 115 permit ip 192.168.200.0 0.0.0.255 192.168.100.0 0.0.0.255

!--- Except the private network traffic from the NAT process.

route-map nonat permit 10
match ip address 110

act
06-06-2003, 05:43 PM
Hi all,

cty mình nối mạng như hình vẽ kèm

http://www.vnpro.org/forum/download.php?id=14

HQ:
- PIX 515 được cấu hình NAT & VPN

Branch:
- Cấu hình Router NAT & VPN

2 mạng chạy VPN & NAT đều okie, nhưng mà mạng HQ ra internet được (ping thấy 172.16.0.1 & 172.16.0.2), còn Branch thì chỉ thấy được mạng bên trong HQ khi VPN chạy, ko ra internet được

Cty muốn Branch khi ra internet phải qua PIX của HQ và Cty không có tiền nâng cấp thêm thiết bị

Bây giờ phải cấu hình như thế nào đây?
Xin giải thích chi tiết giúp mình

cám ơn các anh giúp đỡ

sinhvienngheo
08-06-2003, 02:19 AM
act,

bạn cần phải NO_NAT những traffic VPN từ branch-office về Head Office.

Thứ tự thực hiện:

1. Viết extended access-list match traffic từ branch-HO
2. Định nghĩa route-map NONAT match traffic này.
3. Khi định nghĩa NAT, chú ý không NAT các VPN traffic.

Chúc bạn thành công.

Nếu bạn vẫn không thực hiện được, đừng ngần ngại hỏi nhe.

Chúc vui,

Vuongxibul
15-06-2004, 06:50 PM
chào bà con,
lâu lâu xem lại bài viết của mình thấy không ai theo nữa, buồn quá.
có một giải pháp khác cho vấn đề nat giữa vpn server và vpn client là sử dụng nat-t, hay còn gọi là nat travesal (mình không nhớ từ chính xác).
hiện tại thì chỉ có PIX version 6.3 trở lên mới support nat-t, còn IOS router thì mặc định là support.
Một điều lưu ý là cần xem lại cái cấu hình của client, phải có support mới được đấy nhé.

hainchain
21-06-2004, 04:31 PM
he` he` cai vu nay hinh nhu ba vulxibul gi` gi` do da giai quyet duoc ru`i me` bac post cai solution len cho anh em coi di :) hi` hi` ko hieu sao em ko type duoc tieng viec cac bac admin thong cam nhe

Vuongxibul
22-06-2004, 11:58 AM
oi troi oi, bai nay lau qua roi. tui cung da noi ra cai solution cho ba con roi ma li.
Thoi thi chieu theo y cua anh hainchain. tui noi lenh ra day luon.
cai lenh can lam tren pix version 6.3 la

isakmp nat-traversal 20

con tren router thi mac dinh la da enable roi, minh khoi can lam gi nua.

tren cisco vpn client thi can set trong phan transport la enable transparent tunnel. dung udp .

khac voi su dung concentrator. trong concentrator thi ta co the set trong configure la su dung tcp hoac udp. con tren pix thi chi co udp thoi.
chuc vui.

itmansaigon
23-06-2004, 01:42 AM
Xin chào,

Các giải pháp VPN sau có sẵn NAT-T mà không cần phải dùng đến Cisco
- CheckPoint
- Linux Freeswan
- Linux Openswan & Openvpn
- Linux racoon (Kernel 2.6 or RedHat AS 3.0)