跳到正文
DEV Community· Stefan Muller·· 8 小時前AI 評分40

RouterOS:WireGuard 握手成功但應用程式仍失敗時的 4 項檢查

WireGuard handshakes, but the app still fails: 4 RouterOS checks

AI 導讀

WireGuard 握手成功只確認對等端能驗證身分並交換握手訊息,不能證明一端的工作站可連線至另一端的應用程式。RouterOS 的驗證計劃涵蓋雙向路由、實際應用程式測試、防火牆封鎖規則及獨立管理路徑。Safe Mode 可在工作階段意外結束時還原變更,但不能提供另一條登入路徑。

正文

Stefan Muller

A recent WireGuard handshake confirms that the peers can authenticate and exchange handshake messages. It doesn’t prove that a workstation at one site can reach an application at the other. Here’s what to check before you close the change ticket, on networks you administer.

1. Check the route in both directions

Start with the real client and application addresses. Confirm that each peer’s allowed-address covers the prefixes it’s responsible for and that the routing table sends those prefixes through the intended interface. Check the return route separately. A ping from the router can work while a workstation behind it takes a different path. See the RouterOS WireGuard site-to-site example.

2. Test the application, not just the tunnel

From an approved client, open a read-only page or fetch a non-sensitive test file using the hostname people normally use. Write down the expected response first. If the request fails, check name resolution and whether the application is listening and healthy before changing the tunnel. A tunnel ping tells you nothing about either.

3. Verify that a blocked path stays blocked

From a controlled client you administer, try one new connection your policy explicitly denies. Check that the intended firewall rule logged or counted the attempt. A timeout by itself can also mean a missing route or an unavailable service. Then repeat the allowed application test. On RouterOS, the input chain is for traffic to the router; traffic passing through it is handled by the forward chain.

4. Keep a separate management path

Before editing a router remotely, verify how you’ll get back in if the tunnel drops, who can use that path, and when you’ll roll back. RouterOS Safe Mode can revert changes if its session ends unexpectedly, but it can’t give you a separate way back into the router.

For each check, record what you expected, what happened, and how you know. The VividVPS site-to-site verification worksheet has a copyable test matrix and rollback card.

Disclosure: This post was generated with AI and checked against the RouterOS documentation. It describes a verification plan, not lab or production test results.

來源:DEV Community · dev.to