# What is ADVPN? How to Config ADVPN on Fortigate

## What is ADVPN?

အားလုံးပဲ မင်္ဂလာပါခင်ဗျ၊ ကျွန်‌တော် ဒီနေ့ပြောပြပေးသွားမှာကတော့ ADVPN အကြောင်းလေးပဲဖြစ်ပါတယ်၊ Auto Discovery VPN (ADVPN) က Spoke sites တွေက topology ရဲ့ Hub ကို route မသွားတော့ပဲ Spoke တစ်ခုနဲ့တစ်ခု လိုအပ်ချက်အရ direct tunnels (dynamic) တွေရဖို့ အသုံးပြုတဲ့ IPsec Technology ရဲ့ traditional hub and spoke vpn ဖြစ်ပါတယ်၊

ADVPN ရဲ့ main advantage ကတော့ hub and spoke topology မှာ full mesh ပေးနိုင်တာပဲဖြစ်တယ်၊ ၎င်းက spoke to spoke ကြား connection အပြည့်အဝရရှိဖို့အတွက် delay ဖြစ်မှုကို ‌လျှော့ချ‌ပေးတယ်၊ နောက် အလွန်ကြီးမားတဲ့ full mesh VPN network က issues တွေကိုလဲ ဖြေရှင်းပေးနိုင်တယ် ဖြစ်ပါတယ်၊

Hub နဲ့ Spoke offices တွေမှာ internet connections နှစ်ခု(or)နှစ်ခုထက်ပိုရှိရင် dual-hub ADVPN network လဲတည်ဆောက်နိုင်သလို၊ SD-WAN technology သုံးပြီး Spoke offices တွေကို dynamic tunnels ‌တွေနဲ့ user တွေရဲ့ traffic တွေကို load balance အနေနဲ့လဲ အသုံးပြုနိုင်မယ် ဖြစ်ပါတယ်၊

## How to Config ADVPN on Fortigate Firewall?

Topology အနေနဲ့ကတော့ Hub တစ်ခု၊ Spoke နှစ်ခုနဲ့ သုံးပြသွားမှာဖြစ်ပါတယ်၊

ADVPN ကတော့ other spokes တွေရဲ့ routesတွေကို affect မဖြစ်စေပဲ spoke နှစ်ခုကြား route traffic တွေ peer connection တွေရှိစေဖို့ internal routing protocol တစ်ခုသုံးပေးဖို့လိုအပ်ပါတယ်၊

Fortigate ရဲ့ ADVPN ကတော့ internal routing protocol အနေနဲ့ BGP, OSPF, RIP တွေကို support တယ်၊ အဲ့တော့ ကိုယ်နှစ်သက်တဲ့ routing protocol ကိုအသုံးပြုနိုင်ပါတယ်၊ ဒီ LAB မှာ‌တော့ ကျွန်တော်က routing protocol ကို iBGP နဲ့သုံးသွားမှာဖြစ်ပါတယ်၊

ပြီးသွားရင်တော့ hub and spoke tunnel ထိုးမှာဖြစ်တဲ့အတွက် IPsec hub and spoke ကိုအသုံးပြုသွားမှာဖြစ်ပါတယ်၊

Ok, Let’s start with Lab!

### Lab Topology

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725597321696/cb2ef049-725b-4296-b599-074352053c89.png align="center")

### Tasks

Configure BGP settings on FGT-Hub:

1. On FGT-Hub, go to Network &gt; BGP
    
2. In the Local AS field, enter 65400
    
3. In the Router ID field, enter 0.0.0.101
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725597517919/cfb2f8c7-65ac-43bc-ab6f-9d728416cb40.png align="left")
    
4. Under Neighbor Groups, click Create New
    
5. Enter the following settings:
    
    * Name : Branch-Peers
        
    * Remote AS : 65400
        
    * Activate IPv4 : Enable
        
    * Attribute unchanged : Disable
        
    * Route Reflector client : Enable
        
    * Capability: route refresh : Enable
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725597566295/679ae5dd-04d5-4a60-a92c-2de3ecac90eb.png align="left")
        
6. Click Ok
    
7. Click Apply to save the BGP settings.
    

Configure BGP settings on FGT-Spoke1:

1. On FGT-Spoke1, go to Network &gt; BGP
    
2. In the Local AS field, enter 65400
    
3. In the Router ID field, enter 0.0.0.111
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725597598689/7a855ca3-93b0-4831-9a5c-984907af049d.png align="left")
    
4. Click Apply to save the BGP settings.
    

Configure BGP settings on FGT-Spoke2:

1. On FGT-Spoke2, go to Network &gt; BGP
    
2. In the Local AS field, enter 65400
    
3. In the Router ID field, enter 0.0.0.112
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725597680398/32024af5-edb9-4d24-92f2-c09f82e7091c.png align="left")
    
4. Click Apply to save the BGP settings.
    

လိုအပ်တဲ့ routing protocol ကို create လုပ်ပြီးသွားပြီဖြစ်တဲ့အတွက် IPsec VPN (Hub and Spoke) ကို ထပ်မံ create လုပ်သွားမှာဖြစ်ပါတယ်၊

### Configuration of IPsec Hub and Spoke

Configure VPN on FGT-Hub with the IPsec Wizard:

1. On FGT-Hub, navigate to VPN &gt; IPsec Wizard.
    
2. On the VPN Setup page, use the following settings:
    
    * Name : Branches
        
    * Template type : Hub-and-Spoke
        
    * Role : Hub
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598202000/ee0cc72a-6b48-4709-9ed3-41fd5b4adaee.png align="left")
        
3. Click Next
    
4. On the Authentication page, use the following settings:
    
    * Incoming Interface: ISP (port4)
        
    * Authentication Method: Pre-shared Key
        
    * Pre-shared Key: Labtest098&
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598232372/3fee51cf-a1c7-4a64-9144-9dac20539b6e.png align="left")
        
5. Click Next &gt;
    
6. On the Tunnel interface page, use the following settings:
    
    * Tunnel IP : 10.10.1.101
        
    * Remote IP/Netmask : 10.10.1.1/24
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598286799/a54147e7-a652-4a3e-9fe0-24266970771a.png align="left")
        
7. Click Next &gt;
    
8. On the Policy & Routing page, use the following settings:
    
    * Local AS : 65400
        
    * Local interface : LAN
        
    * Local subnet. Click the +button to add more subnets:
        
        1. 192.168.101.0/24
            
    * Spoke type : Range
        
    * Spoke range prefix : 10.10.1.0/24
        
    * Spoke neighbor group : Branch-Peers
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598317596/2465688c-39a9-4449-b580-c14a1e7eac8c.png align="left")
        
9. Click Next &gt;
    
10. Click Create
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598359627/92d52c90-4f2a-4393-befc-fd0792c7bb2f.png align="left")
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598388352/1ae77a7f-4a04-4662-9a03-1daa6052bf40.png align="left")

Spoke ဘက်တွေကိုကျတော့ အလွယ်တကူ config ချလို့ရအောင် Configuration Key ကို Generate ထုတ်သွားရမယ်ဖြစ်ပါတယ်၊ နောက် Spoke sites တွေထပ်တိုးချင်ရင်လဲ ထပ်တိုးလို့ရပါတယ်၊

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598476363/12060ec7-9f29-4150-b01a-ca54faf395a0.png align="left")

Configure VPN on FGT-Spoke1 with the IPsec Wizard:

1. On FGT-Spoke, navigate to VPN &gt; IPsec Wizard.
    
2. On the VPN Setup page, use the following settings:
    
    * Name : Hub
        
    * Template type : Hub-and-Spoke
        
    * Role : Spoke
        
    * Easy Configuration Key : Spoke #1 ရဲ့ key ထည့်မယ်
        
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598520616/09dc82bc-3ca7-489c-b377-be1b9bdaf417.png align="left")
    
3. Click Next &gt;
    
4. On the Authentication page, use the following settings:
    
    * Pre-shared key : Labtest098&
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598576561/f0795e8d-b93c-4e21-88d7-14a1eeef14ad.png align="left")
        
5. Click Next &gt;
    
6. On the Tunnel interface page, Click Next &gt;
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598604081/caff0a93-fd4e-4eee-8900-b5c6af6c7b52.png align="left")
    
7. On the Policy & Routing page, use the following settings:
    
    * Local AS : 65400
        
    * Local interface : LAN
        
    * Local subnets : 192.168.111.0/24
        
        ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598643233/b59173df-a34e-4c47-bdef-123c4398595d.png align="left")
        
8. Click Next &gt;
    
9. Click Create
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598683293/1f62c22c-a3fc-4234-afd8-549adb23af57.png align="left")
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598691399/b3c47ee3-375f-41cb-b740-bf9e9ef9bacf.png align="left")

ထိုနည်း၎င်းအတိုင်းပဲ Spoke2 ကိုလဲ Spoke1 အတိုင်း config ထပ်လုပ်ရမယ်ဖြစ်ပါတယ်၊

ပြီးသွားရင်တော့ နောက်ဆုံး ကျွန်တော်တို့ Hub ဘက်မှာကော၊ Spoke1, Spoke2 ဘက်တွေမှာပါ VPN Tunnels တွေ up နေပြီဆိုတာ တွေ့ရမှာဖြစ်ပါတယ်၊

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598850007/4dbd74eb-f0e2-48f4-9775-cd18e85b5054.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598908073/235522bd-3083-4aef-b656-067f174b2cf1.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725598922404/8c15263e-6672-460a-a517-ac9c60e197ea.png align="center")

အချိန်ခဏနေကြာရင် Spoke to Spoke ကြား direct tunnels တွေထပ် up လာတာကိုတွေ့ရလိမ့်မယ်ဖြစ်ပါတယ်၊

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599158555/dc8993cf-b1e1-45cb-a73a-8b75e289bdc9.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599181825/08c6c5a8-aa2f-4c35-8ca5-0ba34a567727.png align="center")

Result အနေနဲ့ကတော့ အပေါ်က ပြောခဲ့သလို Auto Discovery VPN သည် Spoke sites တွေက topology ရဲ့ Hub ကို route မသွားတော့ပဲ Spoke တစ်ခုနဲ့တစ်ခု direct tunnel (dynamic)ကို အသုံးပြုသွားတာ တွေ့ရမှာဖြစ်ပါတယ်၊

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599301675/9108eb33-f576-4be1-bf27-f7294f77518f.png align="left")

Spoke1 ရဲ့ Local ကနေ Spoke2 ရဲ့ Local ကို တကယ်အလုပ်လုပ်မလုပ် testing လှမ်း ping ခြင်းဖြစ်ပါတယ်

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599420730/a93b0b5a-cb84-44db-b0bb-dc9c41dc068b.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599430639/d150e19a-0302-4dcd-81a9-b9be5875e6f4.png align="left")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725599443390/5c8955df-5af5-43aa-9d10-49a697892c41.png align="left")

Spoke1 ကနေ Spoke2ကို traffic route သွားတာတွေ့ရမှာဖြစ်ပါတယ်၊ ဒါပေမယ့် Hub ဆီကိုတော့ route သွားခြင်းမတွေ့ရပါဘူး၊ Spoke to Spoke direct tunnel အသုံးပြုသွားတာပဲ တွေ့ရမှာဖြစ်ပါတယ်၊ အားလုံးပဲ ကျွန်တော် Lab လေးကို အချိန်ပေးပြီး ဖတ်ရှုပေးတဲ့ ကျေးဇူးတင်ပါတယ် ခင်ဗျ၊ အမှားများပါခဲ့ရင်လဲ ကျွန်တော့်ကို လာရောက်ပြောပြပေးနိုင်ပါတယ်ခင်ဗျ။
