SSL VPN Debug

        It is very important to go through debug logs if there is an issue with SSL VPN. I have tried here to break down the debug flow so we can understand the flow of VPN and figure out the exact issue.

1st step:

  • Fortigate (FW) and client establish SSL tunnel 
  • It checks client cert requirements and TLS version supported by the client
  • At the end of this flow, you can see the TLS version and cypher used 
IMP: If you are facing any issue at this stage, you can try to verify the TLS version, ciphers and client cert requirement 



2nd step:
  • It matches the authentication rule and checks user credentials
  • It validates the authentication rule (if you have more than one auth role, it use the top to bottom approach
  • You can see authentication successful at last
IMP: If an issue occurs in this stage, you need to verify the auth rule and credentials


3rd step

  • In this step, it does hostcheck (hostcheck is basically checking whether the system support specified OS, registry, AV and firewall)
  • You can also see which portal we are using here (it is tunnel-access)
  • It reserves dynamic IP from the source pool

4th steps:

  • Again, it establishes an SSL connection.




5th Steps:

  • The tunnel is established
  • It does license checks against forticlient
  • Lastly, it establish PPP connection or service



6th steps:
  • Once a PPP connection is established, it negotiate LCP and IPCP protocol 

LCP :

  • The link control protocol (LCP) frames are transmitted during the link establishment and termination phases, and periodically during the life of the link.
  • They are used to negotiate the configuration of the PPP link, and to test and maintain the link, once it is established.



Client ---------------->LCP Request--MRC=1354-----------FW
       ---------------->LCP Request--MRC=1354<----------



[5123:root:0]RCV: LCP Configure_Request id(1) len(14) [Maximum_Received_Unit 1354] [Magic_Number FB7C1352] 
[5123:root:0]SND: LCP Configure_Request id(1) len(10) [Magic_Number 2858EE4F] 
[5123:root:0]lcp_reqci: returning CONFACK.
[5123:root:0]SND: LCP Configure_Ack id(1) len(14) [Maximum_Received_Unit 1354] [Magic_Number FB7C1352] 
[5123:root:0]RCV: LCP Configure_Ack id(1) len(10) [Magic_Number 2858EE4F] 
[5123:root:0]lcp_up: with mtu 1354

IPCP:

Internet Protocol Control Protocol (IPCP) is a Network Control Protocol (NCP) for establishing and configuring Internet Protocol over a Point-to-Point Protocol link.
It is responsible for configuring, enabling, and disabling the IP protocol modules on both ends of the point-to-point link. 


[5123:root:0]SND: IPCP Configure_Request id(1) [IP_Address 10.5.22.103] 
[5123:root:0]RCV: IPCP Configure_Request id(0) [IP_Address 0.0.0.0] [Primary_DNS_IP_Address 0.0.0.0] [Secondary_DNS_IP_Address 0.0.0.0] 
[5123:root:0]ipcp: returning Configure-NAK
[5123:root:0]SND: IPCP Configure_Nak id(0) [IP_Address 10.212.134.200] [Primary_DNS_IP_Address 127.0.0.1] [Secondary_DNS_IP_Address 127.0.0.1] 
[5123:root:0]RCV: IPCP Configure_Ack id(1) [IP_Address 10.5.22.103] 
[5123:root:0]RCV: IPCP Configure_Request id(1) [IP_Address 10.212.134.200] [Primary_DNS_IP_Address 127.0.0.1] [Secondary_DNS_IP_Address 127.0.0.1] 
[5123:root:0]ipcp: returning Configure-ACK
[5123:root:0]SND: IPCP Configure_Ack id(1) [IP_Address 10.212.134.200] [Primary_DNS_IP_Address 127.0.0.1] [Secondary_DNS_IP_Address 127.0.0.1] 
[5123:root:0]ipcp: up ppp:0x7f0c8ee4f000 caller:0x7f0c8eda0900 tun:37








Comments

Popular posts from this blog

Backup your fortigate

IPsec Main and Quick Mode packet flow (Decrypted)