iT邦幫忙

0

VPN site to site 後 mail server無法連線問題

  • 分享至 

  • xImage

https://ithelp.ithome.com.tw/upload/images/20230914/20104846ANhfyzeB1b.jpghttps://ithelp.ithome.com.tw/upload/images/20230914/20104846ANhfyzeB1b.jpg

請問一下各位大大,公司A跟公司B有用VPN連線讓內網可以互通
然後使用者在A公司內網可以用mail.xxx.com.tw收信
但是帶筆電到B公司後,卻無法用mail.xxx.com.tw收信只能設定192.168.0.100才正常

不曉得要如何設定才可以讓B公司可以正常使用?其他地點也有同樣問題,感謝各位大大

補充:
我在想一個問題,就是A公司IP連B公司的IP 223.223.223.223 湊巧是B公司對外的IP
是否是因為這樣,所以A公司防火牆就排除B公司的IP?
所以當我把VPN disable後,防火牆就認定223.223.223.223這個IP是外部IP?

https://ithelp.ithome.com.tw/upload/images/20230918/20104846G4eWQVYChL.jpg
請問如果顯示這樣我該如何修改呢QQ

看更多先前的討論...收起先前的討論...
PIZZ iT邦新手 3 級 ‧ 2023-09-14 13:58:01 檢舉
DNS設定???
DennisLu iT邦研究生 1 級 ‧ 2023-09-14 14:05:19 檢舉
在B 公司的時候的DNS就解不到mail.xxx.com.tw

B公司的DNS設到可以解
或者
去B公司手動設定指向A公司的DNS,反正site to site A公司的DNS應該也能設到可以訪問才對
或者
直接追加
C:\Windows\System32\drivers\etc\hosts
192.168.0.100 mail.xxx.com.tw
DNS通通設8.8.8.8
除了改host之外有其他解嗎?因為也有可能將筆電帶去國外或者居家上班使用
Sujira iT邦新手 4 級 ‧ 2023-09-14 17:10:48 檢舉
使用者在A公司的時候DNS也是8.8.8.8嗎?
沒道理DNS都8.8.8.8 然後換個地點就解析不到 mail這筆紀錄

如果要在公司外部也可以收發, 那麼 mail.xxx.com.tw 要設定外部DNS紀錄
是的 我看A公司防火牆有設定NAT 所以用mail.xxx.com.tw 是可以的
可是到外點的時候,DNS設定8.8.8.8 我用tracert 去看 他就會卡在外面回不去
但是當我用手機當AP又可以連線
Sujira iT邦新手 4 級 ‧ 2023-09-14 17:29:56 檢舉
簡易測試:
在A公司跟外部分別 nslookup -type=a mail.xxx.com.tw 看結果
DennisLu iT邦研究生 1 級 ‧ 2023-09-14 18:03:30 檢舉
A公司內網電腦dns設8.8.8.8 ?
那A公司電腦解析 mail.xxx.com.tw 是 ? 外網IP還是內網IP
aaron3399 iT邦好手 1 級 ‧ 2023-09-14 18:26:59 檢舉
如果外地走mail.xx.com.tw不通,照理說在A公司走mail.xx.com.tw也不會通(因為都會繞外網),但你的狀況卻是A公司內網可通......

1.會不會是A公司DNS把mail.xx.com.tw設成內網192.168.0.100了?
這樣也會符合在A公司內網可通,其他外地都不通的情況....

2.你的情況應該不是site to site VPN的問題,應該是只要離開A公司的地方,就都無法用mail.xx.com.tw收信,包含家裡也是。(但你又說用手機當AP分享4G會通...!?)

3.可能筆電有設定proxy沒有取消!

4.若dns改其他的如168.95.1.1測試過嗎
@dennislu 對的,A公司內網電腦DNS設8.8.8.8 解析是外網IP 123.123.123.124
@aaron3399
1.內網可通我看防火牆是有設NAT 就是123.123.123.124 -> 192.168.0.100 所以我猜因為這樣才通
2.我昨天在車上連手機確實是可以收信的,但我一到B公司後插上網路線就不通,只能把outlook的ip改成192.168.0.100才可以收信
3.proxy沒有設過
4.這個我在家裡用168.95.1.1也沒有問題
aaron3399 iT邦好手 1 級 ‧ 2023-09-15 14:21:26 檢舉
該不會B公司網路是限制連外的吧!?
或者防火牆有鎖MAC上網之類的
@aaron3399
一切都正常,就只是連著VPN site to site 才不行
如果把VPN關掉後就可以正常連線
aaron3399 iT邦好手 1 級 ‧ 2023-09-18 02:21:44 檢舉
應該只是一個小細節忽略或是設錯了XD
找到問題了,就是BUG,需要更改內容
aaron3399 iT邦好手 1 級 ‧ 2023-09-19 15:12:24 檢舉
是甚麼bug啊?
A是CheckPoint的防火牆 B是Fortigate
後來找很久發現是CheckPoint連第三方的VPN 用IPsec連線的問題
https://support.checkpoint.com/results/sk/sk108600#Scenario%203
Scenario 3 - Implied inclusion of Check Point Security Gateway's / 3rd party VPN Peer's interfaces
Symptoms:
Traffic initiated from external interfaces of the 3rd party VPN Peer to external interface of the Check Point Security Gateway is dropped with "Clear text packet should be encrypted" log.
Traffic to the external IP address of the 3rd party gateway fails.
The 3rd party peer sends INVALID-ID notifications, because the Check Point Security Gateway is proposing a VPN tunnel for the external IP addresses.
Show / Hide solution

Explanation:
3rd party devices may not include their external IP addresses in their VPN domain as opposed to Check Point Security Gateway.
This may cause 3rd party VPN peers to send "delete" for Phase 1 and cause tunnel interruptions.
Solution:
Special macro NON_VPN_TRAFFIC_RULES (configured in the relevant "crypt.def" / "user.def" file on the Security Management Server / Domain Management Server) will prevent traffic entering a VPN tunnel, if the source and destination matches the configured rules. For example, all web traffic to all public IP addresses needs to be sent through a VPN tunnel, but only for a subset of the IP addresses in the encryption domain.

Notes:

For Security Gateways R70 and higher, the macro is configured in the relevant "crypt.def" file.
The location of relevant crypt.def file depends on the version of the Check Point Security Gateway and the version of Management Server. Refer to this solution:
sk98241 - Location of 'crypt.def' files on Security Management Server
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

2 個回答

1
sd3388
iT邦好手 1 級 ‧ 2023-09-14 18:59:32

DNS有分內網DNS及外網DNS
因此在外部時收DNS都能解析到mail server

但是在B公司因為不是收到A公司的DHCP
因此DNS是用B公司的設定,
不會有A公司mail server解析
所以才會設.0.100用IP就可以
但這樣外出就又不能用了

你的DNS及路由要配合設定啦

看更多先前的回應...收起先前的回應...

我們公司沒有建DNS,所以都是用中華的168.95.1.1.或是8.8.8.8
A公司內網就是192.168.0.X B公司是192.168.10.X
VPN site to site 基本上就24小時都連著 所以內網都是通的

B要連ERP也只能透過192.168.0.15連線,無法用我們設的erp.xxx.com.tw這樣連線

BKY iT邦研究生 1 級 ‧ 2023-09-15 14:32:40 檢舉

公司沒有建DNS?
那 mail.xx.com.tw 123.123.123.124 的紀錄是加在哪?

@BKY我們mail.xxx.com.tw 這個是外面代管的

sd3388 iT邦好手 1 級 ‧ 2023-09-15 17:13:24 檢舉

應該是你有用政策路由的關係
有大神叫你改SD-WAN
不知你有改嗎

sd3388 我看了防火牆設定沒有政策路由這個選項,只有靜態路由,至於SD-WAN 我完全不熟不敢碰

Sujira iT邦新手 4 級 ‧ 2023-09-16 09:44:37 檢舉

B要連ERP也只能透過192.168.0.15連線,無法用我們設的erp.xxx.com.tw這樣連線

這個 erp.xxx.com.tw 跟 mail.xxx.com.tw 是同網域嗎?
再確認一下, 用戶端在A公司跟B公司的分別DNS指向誰?
你之前說的指向 168.95.1.1 / 8.8.8.8 指的是DC轉寄站?

有沒有可能B公司AD DNS自己有個 xxx.com.tw 的錯誤zone導致異常

sd3388 iT邦好手 1 級 ‧ 2023-09-18 09:45:22 檢舉

設一下指令
set asymroute enable
如果有通,表示你路由去回不同

1
zero
iT邦好手 1 級 ‧ 2023-09-14 19:50:32

解析跟路由問題,A公司所在的DHCP,分發的DNS與路由裡面

有針對mail.xxx.com.tw 跟 192.168.0.100 走向VPN site to site 的網段

B公司因為mail.xxx.com.tw 跟 192.168.0.100 在自己這邊

DNS解析與路由就會跟A公司不同,你應該使用下面這兩個指令去找原因

nslookup mail.xxx.com.tw

TRACERT mail.xxx.com.tw

看更多先前的回應...收起先前的回應...

你好,tracert 這個我有試過,他就卡在外面
https://ithelp.ithome.com.tw/upload/images/20230914/20104846gHRG3kfPfA.jpg

但我剛剛從家裡tracert就完全正常,所以完全不曉得原因了QQ

by2048 iT邦高手 1 級 ‧ 2023-09-15 09:05:54 檢舉

如果是在外網不通,應該找Hinet去查卡住的原因

badboy01 iT邦新手 2 級 ‧ 2023-09-15 09:08:21 檢舉

你要測試看看在B公司DNS解析是否正常

都是正常的,現在就是在想到底是為什麼連著VPN
A公司的防火牆就把B公司的IP給擋在外面

zero iT邦好手 1 級 ‧ 2023-09-15 17:03:18 檢舉

看了上面的問題跟其他人的回覆,我想要提一個你沒有說的事情(可能就是問題的原因)

如果你們的mail server不是架在A公司或者B公司裡面,

而是架在雲端服務上做託管的話,是有可能造成路由不一樣的,

通常架設在雲端的伺服器都會指定IP白名單,所以會造成只有A或者B公司

其中一邊可以連線到Mail,原因就在於你提供的圖片,

最後幾個路由追蹤到全部都是Hinet的路由,所以mail server架設在Hinet雲的機率很大

如果mail server是架在雲端的話,那就跟你們的 VPN site to site 沒有任何關係

你們的VPN site to site 只是 "間接" 受到影響,而不是造成無法連線的 "主因"

zero
抱歉 這不可能啊,不然為什麼192.168.0.100可以收發信

我要發表回答

立即登入回答