PDA

View Full Version : Mình có một thử nghiệm VPN như thế này nhờ các bạn giúp.



Khonggiadinh
30-10-2003, 07:16 AM
Mình có một thử nghiệm như thế này nhờ các bạn giúp.

Xin xem file đính kèm :

Theo đó :

-Với địa chỉ của laptop 192.168.1.3 thì nó có thể được xem như là đang câu vào mặt trong với pix hay không
- Từ mặt trong của pix muốn ping đến 10.32.50.50 thì phải làm thế nào?
- Nếu ping được thì kỹ thuật thuật thực hiện nó có phải là VPN không.

Xin được chỉ giáo.

Cảm ơn

meo_u82
30-10-2003, 08:33 AM
Mình không biết cái PIX là cái gì vậy , nhưng theo mình thì nếu bạn chỉ sử dụng Switch đơn thuần như thế thì chắc chắn là bạn không thể nào làm cho Laptop bạn ping được các network còn lại vì khi bạn nối vào Switch thì nó phải cùng subnet với subnet đó , nếu địa chỉ của PIX là 172.18.124.35/28 thì nếu Server là 172.18.124.157/28 thì PIX và Server sẽ không nhìn thấy nhau vì nó thuộc 2 Subnet khác nhau , bạn có thể đổi IP cho Server từ 172.18.124.33 172.18.124.46 dĩ nhiên là không được đặt là 172.18.124.35 vì nó trùng với của PIX , tương tự , Laptop phải nằm trong vùng địa chỉ trên , nếu bạn nối Laptop vào Switch như thế thì không thể xem như nối vào mặt trong của PIX , mình chỉ nghĩ vậy , nếu có gì sai xót thì xin được các bạn "chỉ giáo" thêm

Khonggiadinh
30-10-2003, 09:20 AM
Rồi.............. bây giờ mình sữa lại địa chỉ của Win2K server la` 172.18.124.39/28. bây giờ thì nó cùng subnet voi Pix Firewall rồi nhé.

Vẫn câu hỏi như cũ. :shock:

Và mình thì vẫn cho rằng Laptop đang đươc câu vào mặt trong của PIX vì nó đang cùng subnet với địa chỉ iniside của PIX. Right???

Mong các bạn cho ý kiến.

Lan Huong
30-10-2003, 01:32 PM
Chào các bạn !

Có thể diễn giải sơ đồ của bạn Khonggiadinh theo mô hình như sau:


Net----------||(PIX)------------------------||(Switch) (laptop)---------------------------||(PC)-----------Net

Và Laptop có cùng subnet với địa chỉ mặt trong mặt trong của PIX. OK?

Theo ý mình thì :

1. Với sơ đồ như thế này thì có thể xem như Laptop đang thuộc mạng bên trong của PIX (vì rõ ràng là địa chỉ của nó có cùng subnet với địa chỉ inside của PIX).

2. Có thể từ mặt trong của PIX ping đến các địa chỉ bên trong của Win2KServer hoặc ngược lại.

Bằng cách nào?
Thì cứ xem như đây là VPN site-to-site !!!!?????

Site1 (Pix) -------------------------------------(Server) Site2

Và để thực hiện điều này có thể cấu hình tại Win2KServer các rule để chấp nhận sự trao đổi thông tin giữa 2 bên. Và cấu hình Pix như la` 1 site khác.

Không biết ý đồ của Khonggiadinh có phải là như thế không ????

Còn các bạn khác........ý kiến các bạn thế nào!

Mong được trao đổi.

meo_u82
02-11-2003, 07:11 PM
Theo mình , nếu PIX là một router thì nếu bạn connect Laptop vào switch , mặc dù về mặt IP thì nó cùng subnet , với mặt trong của PIX ,nhưng nó không cùng segment với interface của PIX , nên bạn không thể dùng Laptop để ping tới các site khác , nếu được thì bạn có thể practice ý kiến của bạn và ý kiến của tôi

hoachuoi
03-11-2003, 08:51 AM
Khonggiadinh ơi,

Nhờ bạn gửi lại sơ đồ theo hình jpg, gif... lên đây được không, như vậy chắc sẽ dễ xem hơn hi. Chỗ mình không mở được cái .zip này và không biết ý đồ của bạn có giống như Lan Huong đã trình bày không nhỉ?

Khonggiadinh
03-11-2003, 10:04 AM
Xin cảm ơn các bạn đã quan tâm đến câu hỏi của mình
to Hoa chuối : Hình mình đã post lại. Bạn xem giúp nhé.
to Lan Hương : Bạn có thể cho mình xem bạn đã config trên PIX và trên Win như thế nào không.

Cảm ơn vì đã quan tâm.
http://vnpro.org/forum/download.php?id=220

hoachuoi
03-11-2003, 12:46 PM
Cám ơn Khonggiadinh đã đáp ứng nhu cầu rất nhanh chóng!

Về sơ đồ này, có lẽ Laptop không nằm ở phía trong của PIX đâu hi, mặc dù địa chỉ giống ở bên trong nhưng về vật lý nó lại nằm cùng switch với cổng bên ngoài, nếu dùng thế này chắc PIX nó sẽ báo lỗi giả địa chỉ IP, phát hiện bởi kỹ thuật anti-spoofing ha.

Nếu muốn ping từ mặt trong của PIX đến mạng 10. mà không có yêu cầu gì đặc biệt hơn, thì cách đơn giản nhất là dùng NAT(/PAT) trên PIX và cài đặt routing ở phía ngoài cho đúng. (route outside 10.32.50.0 255.255.255.0 172.18.124.38).

Còn nếu muốn dùng VPN cũng được, cài đặt VPN site-to-site từ PIX đến Windows server. Cách này rõ ràng là phải cấu hình nhiều hơn cách trên rồi, bạn có thể xem thêm tài liệu về cấu hình site-to-site VPN cho PIX trong Doc CD hoặc trên CCO.

Chúc thành công.

diendan
04-11-2003, 08:26 AM
Ơi Hoa Chuối. Chắc không phải là Anti-Spoofing đâu, về lý thuyết ATS chỉ thực hiện được ở SUBNET không thuộc hai SUBNET của PIX thôi. Laptop chả là gì trong/ngoài của PIX.

Để Ping được:
1.
Router outside: ip route 10.32.50.0 255.255.255.240 172.18.124.38
Win2k : + NAT (Eth [172.] PRIVATE, Eth [10.] PUBLIC)
+ Không cấm ICMP

2. VPN của Hoa Chuối.

Hoa Chuối thấy thế nào?

Thân chào!

Lan Huong
04-11-2003, 08:31 AM
Xin chao`.

Ở đây chỉ xin lạm bàn về VPN………..
Từ ý tưởng của bạn khonggiadinh mình đã thử làm đúng như các giả thiết nêu ra trong mô hình .
Tuy nhiên mình nối inside lẫn outside của PIX vào Switch.
Mục đích là để tạo giả lập kết nối VPN site-to-site . Nếu từ mặt trong của PIX ping đến được 10.32.50.50 thì có nghĩa là kết nối VPN đã tha`nh công phải không anh Hoachuoi. ????
Mình đã config trên PIX như thế này . Tuy nhiên vẫn chưa ping đến được mạng bên trong WIN2KServer và ngược lại. Why why why ??????

Không hiểu là đã sai chỗ nào……

Các đại gia VPN ơi . Giúp mình với nha.


PIX Version 6.2


!--- Source/Destination networks defined

access-list 115 permit ip 192.168.1.0 255.255.255.0 10.32.50.0 255.255.255.0
access-list 115 deny ip 192.168.1.0 255.255.255.0 any
ip address outside 172.18.124.35 255.255.255.240
ip address inside 192.168.1.1 255.255.255.0

!--- Except Source/Destination from Network Address Translation (NAT):

nat (inside) 0 access-list 115
route outside 0.0.0.0 0.0.0.0 172.18.124.36 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h323 0:05:00
sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server RADIUS protocol radius
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
no sysopt route dnat

!--- IPSec transforms

crypto ipsec transform-set myset esp-des esp-md5-hmac

!--- IPSec lifetime

crypto ipsec security-association lifetime seconds 3600
crypto map rtpmap 10 ipsec-isakmp

!--- Source/Destination networks

crypto map rtpmap 10 match address 115
!--- Encryption peer

crypto map rtpmap 10 set peer 172.18.124.38
crypto map rtpmap 10 set transform-set myset
crypto map rtpmap interface outside
isakmp enable outside
!--- Encryption peer

isakmp key ******** address 172.18.124.38 netmask 255.255.255.240
isakmp identity address
!--- Authentication method

isakmp policy 10 authentication pre-share

!--- IKE encryption method

isakmp policy 10 encryption des
!--- IKE hashing

isakmp policy 10 hash sha
!--- Diffie-Hellman group

isakmp policy 10 group 1

!--- IKE lifetime

isakmp policy 10 lifetime 28800telnet timeout 5
ssh timeout 5
terminal width 80
Cryptochecksum:c237ed11307abea7b530bbd0c2b2ec08
: end



Và ở phía Win2Kserver Run / secpol.msc /IP Security Policies on Local Machine /

Ở đây mình cấu hình 2 filter 1 accept lưu lượng từ Win-> PIX và 1 cho phép lưu lượng tù PIX -> Win.

Xin cảm ơn.

net01
04-11-2003, 09:24 AM
Theo mi`nh nghi~, vo*'i ca^'u tru'c le^.nh tre^n thi` co^?ng ethernet inside cu?a PIX pha?i no^'i va`o switch (chu ko pha?i chi? outside cua PIX noi vao Switch nhu hinh ve), dong thoi IP cu?a laptop pha?i cu`ng subnet voi IP cua inside ethernet port thi` moi co' the^? thuc hien duoc. Khong biet y kien cua moi nguoi sao? Mong duoc tham luan!!!!

Khonggiadinh
05-11-2003, 06:47 AM
Oh xin cam on cac ban

nhatpc
22-02-2004, 06:52 PM
Vậy với cấu hình VPN client -----Internet ---Router-----PIX-----VPN server thì config có khó không thế các bác ?

Ai đã config OK cho tớ xin file config được ko?

nhatpc
05-03-2004, 04:15 PM
Help me!

Tớ cấu hình mạng như sau

VPN client -----(Internet gia lap)----PIX 515-----(LAN)---- RADIUS Server

sau đây là file cấu hình PIX


PIX Version 6.3(1)

interface ethernet0 auto

interface ethernet1 auto

interface ethernet2 auto

nameif ethernet0 outside security0

nameif ethernet1 inside security100

nameif ethernet2 dmz security10

enable password 2KFQnbNIdI.2KYOU encrypted

passwd 2KFQnbNIdI.2KYOU encrypted

hostname pixfirewall

fixup protocol ftp 21

fixup protocol h323 h225 1720

fixup protocol h323 ras 1718-1719

fixup protocol http 80

fixup protocol ils 389

fixup protocol rsh 514

fixup protocol rtsp 554

fixup protocol sip 5060

fixup protocol sip udp 5060

fixup protocol skinny 2000

fixup protocol smtp 25

fixup protocol sqlnet 1521

names

pager lines 24

mtu outside 1500

mtu inside 1500

mtu dmz 1500

ip address outside 203.162.100.210 255.255.255.240

ip address inside 172.10.100.20 255.255.255.0

no ip address dmz

ip audit info action alarm

ip audit attack action alarm

ip local pool ippool 172.10.100.250-172.10.100.254

pdm history enable

arp timeout 14400

global (outside) 1 203.162.100.213

nat (inside) 1 0.0.0.0 0.0.0.0 0 0

route outside 0.0.0.0 0.0.0.0 203.162.100.210 1

timeout xlate 3:00:00

timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00

timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00

timeout uauth 0:05:00 absolute

aaa-server TACACS+ protocol tacacs+

aaa-server RADIUS protocol radius

aaa-server LOCAL protocol local

aaa-server partnerauth protocol radius

aaa-server partnerauth (inside) host 172.10.100.19 cisco123 timeout 10

snmp-server host inside 203.162.100.210

no snmp-server location

no snmp-server contact

snmp-server community public

snmp-server enable traps

floodguard enable

crypto ipsec transform-set myset esp-des esp-md5-hmac

crypto dynamic-map dynmap 10 set transform-set myset

crypto map mymap 10 ipsec-isakmp dynamic dynmap

crypto map mymap client authentication partnerauth

crypto map mymap interface outside

isakmp enable outside

isakmp identity address

isakmp policy 10 authentication pre-share

isakmp policy 10 encryption des

isakmp policy 10 hash md5

isakmp policy 10 group 2

isakmp policy 10 lifetime 86400

vpngroup vpn3000 address-pool ippool

vpngroup vpn3000 dns-server 172.10.100.19

vpngroup vpn3000 wins-server 172.10.100.19

vpngroup vpn3000 default-domain fis.com.vn

vpngroup vpn3000 idle-time 1800

vpngroup vpn3000 password ********

telnet timeout 5

ssh timeout 5

console timeout 0

terminal width 80



Ở client dùng VPN Cisco Client 3.6 connect vào PIX, đã check user được rồi. Nhưng status lúc connect của VPN client là

Encryption : 56-bit DES
Authentication : HMAC-MD5
Transparent tunneling : Inactive
Tunnel port : 0
Compress : None
Local LAN access : Disabled
Personal Firewall : None
Firewall policy : None

Làm sao để VPN client truy cập các tài nguyên của LAN như một máy trong LAN vậy các cao thủ ?

danguyennhi
05-03-2004, 09:02 PM
hi nhatpc,

Anh cần phải NO-NAT các IPSec traffic.

!--- Access list to avoid Network Address Translation (NAT)
!--- on the IPSec packets

access-list 101 permit ip 172.10.1.0 255.255.255.0 10.1.2.0 255.255.255.0

(Anh cần phải sửa lại cho đúng địa chỉ của mạng của anh)

sau đó apply lệnh NAT:

nat (inside) 0 access-list 101

mến,

nhatpc
06-03-2004, 08:57 PM
Hic, đã thử như vậy nhưng vẫn không chạy. Mình thêm 2 lệnh là

access-list 101 permit ip 172.10.100.0 255.255.255.0 203.162.100.0 255.255.255.0
nat (inside) 0 access-list 101

Thế đã đúng chưa ?

danguyennhi
09-03-2004, 12:20 AM
anh thử cấu hình này nè, thay bằng các địa chỉ của network của anh nhé.

PIX Version 6.1(1)
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 intf2 security10
nameif ethernet3 intf3 security15
enable password 8Ry2YjIyt7RRXU24 encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfirewall
domain-name cisco.com
fixup protocol ftp 21
fixup protocol http 80
fixup protocol h323 1720
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol sip 5060
fixup protocol skinny 2000
names

!--- Do not use Network Address Translation (NAT) for inside-to-pool
!--- traffic as this should not go through NAT.

access-list 101 permit ip 10.48.66.0 255.255.254.0
10.48.67.0 255.255.255.0

!--- Permits Internet Control Message Protocol (ICMP),
!--- TCP and User Datagram Protocol (UDP) traffic from any
!--- host on Internet (non-VPN) to the web server.

access-list 120 permit icmp any host 200.1.1.99
access-list 120 permit tcp any host 200.1.1.99
access-list 120 permit udp any host 200.1.1.99
pager lines 24
interface ethernet0 10full
interface ethernet1 10full
interface ethernet2 auto shutdown
interface ethernet3 auto shutdown
mtu outside 1500
mtu inside 1500
mtu intf2 1500
mtu intf3 1500
ip address outside 200.1.1.1 255.255.255.0
ip address inside 10.48.66.18 255.255.254.0
ip address intf2 127.0.0.1 255.255.255.255
ip address intf3 127.0.0.1 255.255.255.255
ip audit info action alarm
ip audit attack action alarm
ip local pool ippool 10.48.67.1-10.48.67.20
no failover
failover timeout 0:00:00
failover poll 15
failover ip address outside 0.0.0.0
failover ip address inside 0.0.0.0
failover ip address intf2 0.0.0.0
failover ip address intf3 0.0.0.0
pdm history enable
arp timeout 14400
global (outside) 1 200.1.1.100-200.1.1.110

!--- Access control list (ACL) to bypass NAT for VPN traffic.

nat (inside) 0 access-list 101
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) 200.1.1.99 10.48.66.99
netmask 255.255.255.255 0 0
access-group 120 in interface outside
route outside 0.0.0.0 0.0.0.0 200.1.1.3 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h323
0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server RADIUS protocol radius
aaa-server AuthInbound protocol tacacs+

!--- Authentication, authorization, and accounting (AAA)
!--- statements for authentication.

aaa-server AuthInbound (inside) host 10.48.66.102
cisco timeout 10
aaa authentication include http outside 10.48.66.99
255.255.255.255 0.0.0.0 0.0.0.0 AuthInbound
aaa authentication include ftp outside 10.48.66.99
255.255.255.255 0.0.0.0 0.0.0.0 AuthInbound
aaa authentication include telnet outside 10.48.66.99
255.255.255.255 0.0.0.0 0.0.0.0 AuthInbound
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable

!--- Trust IPSec traffic and avoid going through ACLs/NAT.

sysopt connection permit-ipsec
no sysopt route dnat

!--- IPSec configuration.

crypto ipsec transform-set myset esp-des esp-md5-hmac
crypto dynamic-map dynmap 10 set transform-set myset
crypto map mymap 10 ipsec-isakmp dynamic dynmap

!--- Assign IP address for 1.1 clients.

crypto map mymap client configuration address initiate
crypto map mymap client configuration address respond
crypto map mymap client authentication AuthInbound
crypto map mymap interface outside
isakmp enable outside

!--- Pre-shared key for 1.1 clients.

isakmp key ******** address 0.0.0.0 netmask 0.0.0.0
isakmp identity address

!---Assign addresses from "ippool" pool for VPN 1.1 clients.

isakmp client configuration address-pool local ippool outside

!--- ISAKMP configuration for VPN client 3.x.

isakmp policy 10 authentication pre-share
isakmp policy 10 encryption des
isakmp policy 10 hash md5
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400

!--- ISAKMP configurationn for VPN client 1.x.

isakmp policy 20 authentication pre-share
isakmp policy 20 encryption des
isakmp policy 20 hash md5
isakmp policy 20 group 1
isakmp policy 20 lifetime 86400

!--- Assign addresses from "ippool" pool for 3.5 clients.

vpngroup vpn3000 address-pool ippool

!---- Assign DNS/WINS/domain server for 3.5 clients.

vpngroup vpn3000 dns-server 10.48.66.7
vpngroup vpn3000 wins-server 10.48.66.100
vpngroup vpn3000 default-domain cisco.com
vpngroup vpn3000 idle-time 1800

!--- Group password for 3.5 clients.

vpngroup vpn3000 password cisco
telnet timeout 5
ssh timeout 5
terminal width 80
Cryptochecksum:d41d8cd98f00b204e9800998ecf8427e
: end
[OK]
pixfirewall#

Nếu làm không chạy, anh capture output của các lệnh sau và post lên thread này cho em ngay nhé

#debug crypto ipsec - Used to see the IPSec negotiations of phase 2.

#debug crypto isakmp - Used to see the ISAKMP negotiations of phase 1.

chào anh nhé

nhatpc
09-03-2004, 12:39 PM
Thanks danguyennhi rất nhiều nhưng cấu hình của bạn vẫn không chạy với server của mình, không check user được trong khi đó mình check đã OK. Theo mình phỏng đoán có lẽ do dòng lệnh sau :

aaa-server AuthInbound (inside) host 10.48.66.102 cisco timeout 10

Vì mình dùng radius server cơ mà!

Bạn có chat bằng Yahoo ko? nếu có thể chat với mình thì ID của mình là nhatpc.

danguyennhi
09-03-2004, 10:00 PM
anh nhatpc,

anh post lên đây output của các lênh sau. okey man?

#show crypto isakmp sa
# show crypto ipsec sa
# debug crypto isakmp
# debug crypto ipsec

Anh đang dùng radius server là gì vậy?