Skip to main content
l33vi3w
New Member
Jan 17, 2020 10:15 AM UTC
Solved

Remove Virtual IP command

Hi,

 

Is there a command to remove a virtual ip, without using the gui?

I am using a serial connection to my Fortigate 201e.

I've been locked out and can't connect to it over https.

 

Thanks!

    nbctcp
    nbctcpAnswer
    New Member
    Jan 25, 2020 7:23 AM UTC

    FW1 # config firewall vip

    FW1 (vip) # show config firewall vip edit "1" set extip 192.168.88.25 set extintf "port1" set mappedip "10.0.3.11" next end

    FW1 (vip) # delete 1

    FW1 (vip) # end

    2 replies

    Yurisk
    SuperUser
    SuperUser
    Jan 17, 2020 11:09 AM UTC

    Fortigate is fully manageable via CLI as well. 

    1. Find the policy ID where your VIP is used :

    show firewall policy

    2. Either delete the policy completely or disable it:  

    a) Delete (make sure you use correct policy id), e.g. you want to delete policy with id 2:

     config firewall policy

    delete 2

    end

    b) Disable, e.g. policy id 2:

    config firewall policy

    edit 2

    set status disable

    next

    end

     

    There can be slight delay between entering the commands and FG actually cleaning its connection table for this VIP. 

    yurisk.info - all things Fortinet blog, no ads
    nbctcp
    nbctcpAnswer
    New Member
    Jan 25, 2020 7:23 AM UTC

    FW1 # config firewall vip

    FW1 (vip) # show config firewall vip edit "1" set extip 192.168.88.25 set extintf "port1" set mappedip "10.0.3.11" next end

    FW1 (vip) # delete 1

    FW1 (vip) # end

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT