顯示具有 VPN 標籤的文章。 顯示所有文章
顯示具有 VPN 標籤的文章。 顯示所有文章

2022/09/23

Fortigate VPN token有時後會沒用

 在fortigate上設定好ad帳號登入vpn,要啟用token驗證,才能連線。

但有些使用者設定好,手機上的程式也啟用了,登入vpn時就不會跳出要輸入token code,就直接登入成功了。

後來才發現是登入帳號大小寫的問題,有的人帳號是用大寫,就不需要輸入token code,用小寫才需要。

後來發現是我們在設定vpn的權限時,一開始是還沒用token時,直接把ad群組加入vpn的設定中。

現在因為要用token,需要把個別的ad帳號加到用戶名單,再加到vpn設定中。

所以vpn的設定裡就會有兩個不同的帳號來源,這時後只要把在vpn設定裡的ad群組拿掉,就行了。

user登入後,就只能接受跟用戶名單裡大小寫都要相符的帳號做登入。


Fortigate VPN Token Sometimes Doesn't Work

When setting up an AD account for VPN login on Fortigate, token authentication needs to be enabled to establish a connection.

However, some users have successfully configured their accounts and activated the token authentication on their mobile devices, but when they log in to the VPN, they are not prompted to enter the token code. Instead, they are logged in directly.

Later, we realized that the issue was related to the case sensitivity of the login credentials. Some users had their usernames in uppercase, which bypassed the need for a token code, while lowercase usernames required it.

We discovered that when initially setting up VPN permissions, before using tokens, we directly added the AD group to the VPN configuration.

Now, with the token requirement, individual AD accounts need to be added to the user list and then included in the VPN configuration.

As a result, the VPN configuration will have two different sources for account information. To resolve this, we simply need to remove the AD group from the VPN configuration.

After this change, users will only be able to log in with usernames that match the case sensitivity specified in the user list.

2022/09/22

fortiVPN 使用token登入錯誤 : fortitoken clock drift detected

 結果是安裝fortitoken mobile的手機時間錯誤,把時間調對就好了。


fortiVPN login error with token: fortitoken clock drift detected.

 The issue was caused by incorrect time settings on the mobile device where fortitoken mobile was installed. Simply adjusting the time resolved the problem.

2022/08/09

Forti VPN連不上-- 'The server you want to connect to requests identification. Please choose a certificate and try again ( -5)'

 原本很舊的Forti防火牆升級後,有一些人的VPN就無法連線了,本來以為跟client端的vpn程式版本有關,因為公司內有4、5、6、7四種版本。

但後來發現這4個版本也都有不同的使用者可連上VPN,所以不是這個問題。

所以就用就錯誤訊息去查



後來是直接去IE的網際網路選項中,在進階設定裡把TLS1.1跟1.2打勾,就可以解決這個問題了。


Forti VPN cannot connect - 'The server you want to connect to requests identification. Please choose a certificate and try again (-5)'.
After upgrading an outdated Forti firewall, some people were unable to connect to the VPN. Initially, I thought it might be related to different versions of the VPN client software (versions 4, 5, 6, and 7) used within the company.
However, I later discovered that users with all four versions were able to connect to the VPN, so that wasn't the issue.
To troubleshoot, I investigated the error message further.
Eventually, I found that the solution was to go to the Internet Options in Internet Explorer and enable TLS 1.1 and 1.2 in the advanced settings. This resolved the problem.


2022/03/18

Forti SSLVPN 禁止特定IP連線

 Forti 防火牆上的SSLVPN連線功能,在GUI的設定介面裡,可以設定只允許特定IP連線,屬於白名單的方式。



可是公司的人會去其他國家出差,所以也無法確定到底哪些外部IP會連進來做SSLVPN的連線。 禁止特定IP連線。

然後又發現有特定的IP一直試著用不同帳密在TRY SSLVPN連線,實在有點擔心。

後來發現是有設定可以把白名單的限制方式,改成黑名單,但這要用指令來開啟

#config vpn ssl settings

     set source-address-negate enable

設定好之後,原本在GUI上啟用的白名單連線,就會變成是黑名單的效果了,只是在GUI的畫面上,上面還是一樣是寫允許清單,而不是禁止清單。



Forti SSLVPN Blocking Specific IP Connections

The SSLVPN connection feature on the Forti firewall allows you to set up a whitelist of specific IP addresses that are allowed to connect through the GUI configuration interface.

However, in our company, employees often travel to different countries, making it difficult to determine which external IP addresses will be used for SSLVPN connections. Therefore, we want to block specific IP connections.

We also noticed that there were certain IP addresses continuously attempting to connect through SSLVPN using different credentials, which raised some concerns.

Eventually, we discovered a configuration option that allows us to change the whitelist restriction to a blacklist, but it requires using commands.

#config vpn ssl settings

 set source-address-negate enable

After setting this up, the whitelist connections that were previously enabled in the GUI will effectively become a blacklist. However, in the GUI interface, it will still indicate "Allow List" instead of "Block List."


2022/03/17

Forti SSLVPN 程式離線安裝

 Forti防火牆上的sslvpn 連線程式,可以上forti的網站下載。

但下載下來的安裝程式並不是完整的,執行時才會再連上網下載真正的安裝程式到電腦的一個暫存資料夾,載完後才執行安裝,有點浪費時間,而且一定要有網路功能,才能進行安裝。

所以就想找能不能有一個實際的安裝檔,這時就要這麼做

一開始先找一台電腦,照上面的方式,下載最新的安裝程式,執行後會再下載真正的安裝程式,下載好後就會進行安裝,跳出安裝畫面。

這時請到本機的 %LocalAppData%\Temp directory 資料夾中,會看到sslvpn 連線程式的真正安裝檔,檔名會叫"FortiClientVPN...."之類的,蠻好找的,把這個檔案複製出來。

之後其他台電腦要裝,就直接用這個檔案來裝就行了。


Forti SSLVPN program offline install

The SSL VPN client program on the Forti firewall can be downloaded from Forti's website.

However, the downloaded installation program is not complete. It only connects to the internet during execution to download the actual installation files into a temporary folder on the computer. After the files are fully downloaded, the installation process begins. This method is time-consuming and requires an internet connection to complete the installation.

Therefore, the goal is to find an actual installation file. Here's how to do it:

Start by using a computer to download the latest installation program following the aforementioned steps. After executing it, the program will initiate the download of the actual installation files. Once the download is complete, the installation process will begin, and an installation window will appear.

At this point, navigate to the "%LocalAppData%\Temp" directory on your local machine. You will find the actual installation file for the SSL VPN client program there. It will have a filename similar to "FortiClientVPN...." and should be easily identifiable. Simply copy this file.

For installing on other computers, you can directly use this copied file for installation.

2021/05/25

Fortigate 啟動切分隧道 設定

因為最近居家辦公的人變多了,Fortigate VPN流量變大,所以就決定要啟動切分隧道的設定。

這個功能不啟動的時後,外部電腦透過VPN連到公司內部時,如果這時後他在上外部的網站,流量也都會透過VPN在出去,多繞了一圈,所以啟用切分隧道就可以讓外部網站的流量不用先流進公司再出去。

啟用切分隧道後,要指定路由地址,這個就是指你哪些網段要透過VPN來連線,有需要讓使用者連到的網段就都加進去。

加完按確定時,會跳出錯誤。







錯誤訊息顯示ID 88號這個策略的目的地址設定all會有問題。所以就要去修改這條策略的目的地址。

修改的方式有兩種,一個就是把目的地址不要設成all,改成要連線的目的。

如果你的目的就是無法確定,那就是直接把這條政策刪掉。

改完後在重新啟用切分隧道就可以成功了。

這時後連上VPN,可以上外部網站查一下目前的外部IP,就會顯示自己現在外部網路的IP,而不是公司的對外IP。

2021/03/15

FortiGate 80C sslvpn 連不上 (-7200)

 有一台Forti 80C的防火牆,os是5.0,非常老舊。

上面本來有SSLVPN可以用,結果突然就連不上的,設定完全沒動。

錯誤訊息就是Credential or SSLVPN configuration is wrong (-7200)








網路上查了一下好像也沒什麼有用的訊息,就自己慢慢找試。

重裝最新的vpn 程式-->沒用。

vpn設定全部重設-->沒用。

設認的設定重設-->沒用。

sslvpn服務重啟-->沒用。

最後只好重開防火牆主機,居然就行了,看來重開機才是最強的。

看來這台老機器應該也快不行了,該升級了。


2020/05/19

Fortigate 5.0 VPN設定失敗 沒有"Enable IPsec interface mode"

不同版本的Fortigate 防火牆,裡面的設定畫面都有點不同。
在5.0的版本裡,要設定site to site VPN,不像比較新的版本直接有範例可以套用,要自己手動設定。
在設定時,參照網路上的說明,有一個"Enable IPsec interface mode"要打勾,但卻找不到這個選項,後來設定好也一直沒辦法連線成功。
原來是這個功能被隱藏了,如果要啟動的話,要到設定裡把功能打開才可以,官方的網站有也有教學可以參考(https://kb.fortinet.com/kb/viewContent.do?externalId=FD35007)。


2020/05/08

連線windows L2TP/PPTP VPN後 DNS request time out

之前用windows2012來建立VPN server,L2TP & PPTP都可以連線。

但最近突然出現了一個怪問題,VPN連上後,client電腦透過IP連到區網內的其他伺服器都沒問題,但用電腦名稱就會失敗,PING IP都正常,但用NSLOOKUP去測,都會time out。

查client或server上的log也查不到東西,原來是因為之前server都沒裝防毒,後來為了安全就裝了,結果就發生這個問題,防毒移掉就行了。

2019/06/04

FortiClient SSLVPN 連線失敗 The VPN server may be unreachable (-5)

公司有不同的廠,都是用forti的防火牆,最近在使用fortigate的sslvpn功能時,連上A廠的vpn,正常,連B廠的vpn,會出現  The VPN server may be unreachable (-5)的錯誤,但只有少數的電腦有這些問題,所以判斷問題是在電腦本身的設定上。







直接用電腦去ping vpn的ip,或是直接telnet vpn的port,都是通的,所以這個錯誤訊息只是僅供參考。
後來在查了一下,剛好有查到解法,其實是在IE的設定裡,關於TLS的功能沒啟用到相對應的版本造成的,就到設定中把TLS去啟用就行了,至於要啟用哪一個版,就自行去測試吧,因為自己使用的跟網路上查到的是不一樣的。


2018/10/09

Fortigate 不同型號 Site to site VPN設定

最近在做fortigate site to site VPN的設定,設定方式網路上的查的到,這邊就不說了,主要是要講幾個設定上的心得
1 可以不同型號的兩台fortigate做vpn連線。
2 設定完如果無法啟動,請確認兩邊的設定要互相符合,像是密鑰,遠端地址,本端地址都要對應起來。





3 VPN建立後,就算沒成功,路由跟policy都會個動產生,不用自己手動新增。
4 設定過程不會造成斷線。