Wednesday, January 20, 2010

loopback on Fortigate

config system interface

edit "loopback"
set vdom "root"
set ip 10.0.0.2 255.255.255.255
set allowaccess ping
set type loopback
next

end

L2tp in Fortigate

config system interface

edit "wan1"
set vdom "root"
set mode dhcp
set allowaccess ping https ssh snmp http telnet
set gwdetect enable
set l2forward enable
set type physical
set l2tp-client enable
set speed 100full
config l2tp-client-settings
set auth-type pap
set defaultgw enable
set mtu 1392
set password ENC BnDHJbL96OH7avonZulRAWno1Otg48oH+X1+HTPCeDL1ob8Up6lawLSLgI+kyAhl+WfYuGLyIpUm4IEtgOpqUeAAiolHGGeVKpXs5sSps0U4ZugD
set peer-host "212.143.205.253"
set user "username"

end
next
end


config router static

edit 1
set device "wan1"
set dst 212.143.205.253 255.255.255.255
set priority 10

next
end


don't forget to add a static route to the L2tp gateway (in my case 212.143.205.253) through WAN1 interface.