Konfigurasi Remote VPN L2TP/IPSec di Cisco Router IOS
Pada kesempatan kali ini kita akan mencoba melakukan konfigurasi Remote Access VPN L2TP/IPsec pada router IOS.
L2TP merupakan salah satu teknologi VPN selain:
- PPTP
- IKEv2 VPN
- SSL VPN
Namun L2TP tidak memiliki enkripsi, sehingga perlu diamankan menggunakan IPSec.
Teknologi ini juga bisa diterapkan di:
- Linux → menggunakan StrongSwan
- Windows Server → menggunakan fitur RRAS
🧠 Konsep Singkat L2TP/IPsec
Alur kerjanya:
1️⃣ IPSec membuat secure tunnel terlebih dahulu
2️⃣ Setelah itu L2TP berjalan di dalam tunnel IPSec
3️⃣ User melakukan autentikasi PPP (MS-CHAPv2)
Jadi:
IPSec = keamanan (enkripsi & integrity)
L2TP = tunneling PPP user
🏗 Topologi Sederhana
Client VPN → Internet → Router EDGE
IP Router:
WAN EDGE = 1.1.1.1
Pool VPN = 192.168.168.5 – 192.168.168.10
Loopback = 192.168.168.254
⚙️ Komponen Konfigurasi Penting
Berikut penjelasan bagian konfigurasi dari show run.
1️⃣ Enable L2TP VPDN
vpdn enable
vpdn-group l2tp-group
accept-dialin
protocol l2tp
virtual-template 1
no l2tp tunnel authentication
Fungsi:
- Mengaktifkan layanan L2TP server
- Menentukan template interface untuk user VPN
2️⃣ User VPN
username cisco privilege 15 password 0 cisco
Digunakan untuk autentikasi PPP login VPN.
3️⃣ IPSec Phase 1 (ISAKMP)
crypto isakmp policy 1
encr 3des
authentication pre-share
group 2
lifetime 3600
Artinya:
- Enkripsi: 3DES
- Autentikasi: PSK
- DH Group: 2
Pre-shared key:
crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
Berlaku untuk semua client.
4️⃣ IPSec Phase 2 (Transform Set)
crypto ipsec transform-set l2tp-ipsec-transpor-esp esp-3des esp-sha-hmac
mode transport
Mode transport wajib untuk L2TP/IPsec.
5️⃣ Crypto Map
crypto dynamic-map my-dynamic-map 1
set nat demux
set transform-set l2tp-ipsec-transpor-esp
crypto map my-static-map 1 ipsec-isakmp dynamic my-dynamic-map
Lalu di-attach ke interface WAN:
interface FastEthernet0/0
ip address 1.1.1.1 255.255.255.0
crypto map my-static-map
6️⃣ Virtual Template (Interface VPN User)
interface Virtual-Template1
ip unnumbered Loopback0
peer default ip address pool l2tp-pool
ppp authentication ms-chap-v2
Fungsi:
- Template interface untuk client VPN
- Menggunakan IP pool
7️⃣ IP Pool VPN
ip local pool l2tp-pool 192.168.168.5 192.168.168.10
Range IP yang akan diberikan ke user VPN.
✅ Cara Kerja Setelah Konfigurasi
Saat client connect:
- IPSec tunnel terbentuk
- L2TP session dibuat
- User login dengan username/password
- Client mendapat IP dari pool
- Tunnel siap digunakan
🔎 Verifikasi & Troubleshooting
Cek IPSec
show crypto isakmp sa
show crypto ipsec sa
Cek L2TP Session
show vpdn session
Debug
debug crypto isakmp
debug crypto ipsec
debug ppp authentication
⚠️ Catatan Best Practice
Untuk produksi sebaiknya:
- Gunakan AES bukan 3DES
- Gunakan SHA-256
- Gunakan certificate authentication
- Aktifkan NAT-Traversal
📚 Referensi Tutorial
Tutorial yang diikuti:
http://jazier.blogspot.com/2015/08/cisco-remote-access-l2tpipsec-psk-vpn.html
👍 Kesimpulan
L2TP/IPsec pada Cisco:
- Mudah dikonfigurasi
- Kompatibel dengan Windows, Linux, Android
- Aman karena menggunakan IPSec
Namun saat ini di dunia enterprise mulai banyak beralih ke:
- IKEv2
- SSL VPN
- WireGuard
Komentar