NSE7 Troubleshooting and Diagnostics Practice Question
When troubleshooting an IPsec VPN phase 1 failure, you run 'diagnose vpn ike config' and see that the remote gateway IP address is incorrect. Which command is used to correct the peer IP configuration?
⚠ Common exam trap
Test-takers frequently confuse operational commands (like 'execute vpn tunnel down') with configuration commands, or mistake authentication settings (PSK or certificate) for peer addressing, leading them to select options that do not actually change the remote gateway IP.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
config vpn ipsec phase1-interface edit <name> set remote-gw <ip>
The 'config vpn ipsec phase1-interface' command allows you to edit the phase1 configuration, and the 'set remote-gw <ip>' command directly corrects the peer IP address. This is the standard FortiGate CLI method to update the remote gateway IP for an IPsec VPN phase1 interface, which is essential for establishing the IKE session.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
set psksecret <secret>
Why it's wrong here
'set psksecret' defines the pre-shared key used for phase 1 authentication, so it cannot change the remote gateway address that 'diagnose vpn ike config' flagged; it would be the correct command when the tunnel fails because the pre-shared secret on both peers does not match.
- ✗
execute vpn tunnel down <tunnel>
Why it's wrong here
'execute vpn tunnel down' only tears down an existing tunnel; it cannot alter the peer IP address stored in phase 1 configuration. It is tempting because it is a VPN troubleshooting command, and it would be correct when you need to force a tunnel to renegotiate after changing configuration elsewhere.
- ✓
config vpn ipsec phase1-interface edit <name> set remote-gw <ip>
Why this is correct
Editing the phase1-interface object and setting remote-gw directly corrects the peer address that phase 1 negotiation uses, satisfying the stem's requirement to fix the incorrect remote gateway IP. The `diagnose vpn ike config` output reflects this value, so amending it here resolves the mismatch causing the failure.
- ✗
set certificate <name>
Why it's wrong here
The peer IP is set with 'set peer <ip>' (or 'set remote-gw'), not a certificate command; 'set certificate' binds an X.509 certificate to the phase 1 proposal for certificate-based authentication, so it would be the right command only when configuring certificate authentication rather than correcting a wrong gateway address.
Quick reference
VPN Protocol Comparison
| Protocol | Port | Encryption | Authentication | Use Case |
|---|---|---|---|---|
| IKEv2 / IPsec | UDP 500 / 4500 | AES-256 | Certificates / PSK | Site-to-site & remote access |
| SSL / TLS VPN | TCP 443 | TLS 1.3 | Certificates / MFA | Clientless remote access |
| L2TP / IPsec | UDP 1701 | AES (IPsec) | PSK / Certificates | Legacy remote access |
| WireGuard | UDP 51820 | ChaCha20 | Public keys | Modern high-performance VPN |
| PPTP | TCP 1723 | MPPE (weak) | MS-CHAPv2 | Legacy — avoid in production |
PPTP is considered insecure. IKEv2/IPsec and SSL VPN are the current recommended options.
Go deeper
Related to this question
About these practice questions
Courseiva writes every NSE7 question from scratch — 718 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This NSE7 practice question is part of Courseiva's free Fortinet certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the NSE7 exam.