2020年5月4日 星期一

Reset the win 7 to get the IP if hotspot is not available

How to Solve the Windows Could Not Automatically Detect Network Proxy Settings Error

 Ben Stegner  
Sometimes you’ll see that frustrating yellow exclamation point icon over your network connection icon in Windows. The OS offers to troubleshoot it for you, but after running through the automatic tool, you see this message:
Advertisement
Windows could not automatically detect this network’s proxy settings.
What does this mean, and how do you fix it? Let’s take a look at Windows’ proxy settings and the steps to repair this.

1. Reboot Your Computer and Router

Before you launch into advanced troubleshooting, it’s always a good idea to restart your equipment first. There’s a chance that this will clear up your issue in a few moments.
Because this error is usually related to misconfigured settings on one computer, restarting your router likely won’t have an effect. But it’s still worth a try whenever you run into network problems of any kind.
If you reboot your computer and router and the problem hasn’t fixed itself, continue on with the more detailed steps.

2. Review Proxy Settings in Windows

Windows 10 Proxy Settings
Because this issue is related to your Windows proxy settings, that’s a sensible first place to check. To access proxy settings in Windows 10, open Settings, select the Network & Internet category, and switch to the Proxy tab from the left sidebar.
Here you’ll see a list of options related to proxy servers. If you don’t use a proxy (as is the case for most home users), make sure the Use a proxy server slider is turned off. Leave Automatically detect settings on if it is already.
For users who do connect with a proxy, such as in a work or education environment, you might want to check with your system administrator to make sure you have the correct proxy details.
After this, try reconnecting to the network again. If you still get the error, try turning off Automatically detect settings in the proxy options and try once more.

What’s a Proxy Server?

We don’t want to bore you with the details while you try to fix this issue but wanted to provide a brief explanation of what a proxy actually is and why Windows can run into problems with it.
Essentially, a proxy server acts as a middleman between your computer and the internet. Instead of you connecting directly to the internet, you connect to the server, which grabs information from the internet for you.
These are most common in business and school use, where system administrators use them for security and efficiency. It’s very unlikely that you would use a proxy server on your home network unless you specifically set one up. This is why you should clear any proxy settings that might exist when you run into this issue.
See our full explanation of proxy servers for more information.
 What Is a Proxy Server?Heard the term "proxy server" but have no idea what it means? Here's how a proxy can help beat region blocking and more.Read More

3. Run the Network Adapter Troubleshooter

When you right-click on the network connection icon and choose to troubleshoot, it runs the Internet Connections troubleshooter, resulting in the “Windows could not detect proxy settings” error. But there’s another network troubleshooter you can run that might provide more help.
Open Settings again and visit Update & Security > Troubleshoot. Find Network Adapter in the list and walk through the troubleshooter for this. As seasoned Windows users know, this tool doesn’t always fix your problem, but it’s worth a try.

4. Auto-Obtain IP Address and DNS

Windows IP Settings
As it turns out, there aren’t many troubleshooting steps specific to proxy servers. We’ll share more tips below, but bear in mind that the troubleshooting looks similar to fixing the “No Internet Access” Windows error from this point on.
 Connected to Wi-Fi, But No Internet Access in Windows? Here's the Fix!Seeing the annoying "connected but no internet" error on your Windows PC? Follow these steps when you have no internet access.Read More
While they’re not technically related to your proxy settings, misconfigured IP address or DNS settings can cause this error too. To check them, browse to Settings > Network & Internet > Status. Click the Change adapter options button in the list to see all your network connections, then double-click on the one you’re using.
Here, click the Properties button and double-click Internet Protocol Version 4 in the list. Make sure you have both Obtain an IP address automatically and Obtain DNS server address automatically selected. Misconfigured settings here will prevent you from getting online.

5. Update or Roll Back Your Network Driver

Windows 10 Device Manager Update Roll Back
An outdated network driver may lead to connection problems. Similarly, perhaps you’ve recently installed a botched update for your network driver. In either case, replacing it might clear up the trouble.
Right-click on the Start Button and choose Device Manager to open this utility. Expand the Network adapters section and double-click on the connection you use.
On the Driver tab, you can choose Roll Back Driver to uninstall the latest update and return to the previous one. Use this if you started experiencing this issue after updating.
Choose Update Driver and you can check for new updates over the internet. This likely won’t find anything though, so you’ll need to manually download the latest driver from your machine’s manufacturer. See our guide to updating Windows drivers for help.
 How to Find & Replace Outdated Windows DriversYour drivers might be outdated and need updating, but how are you to know? Here's what you need to know and how to go about it.Read More

6. Reset Network Configuration Via the Command Prompt

Windows offers many network troubleshooting tools through the Command Prompt. A few quick commands can clear up your issue in moments. If you’re still having trouble at this point, right-click the Start Button again and open a Command Prompt (or PowerShell) as Administrator.
Then run the following commands, one at a time. They will reset various network functions of your computer:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns

7. Review Firewall, VPN, and Antivirus Software

Windows Defender Firewall
You should next make sure you don’t have a firewall, VPN, or security suite interfering with your network connection. Perhaps your chosen software had an update that changed some settings you weren’t aware of, or you just installed a new app.
Try disabling your firewall, VPN, and antivirus software one at a time, then see if the error goes away. If it does, the issue lies with one of those apps. You’ll need to configure them to avoid interfering with regular network activity.

8. Scan for Malware

Some malware has been known to continually mess with your proxy settings to prevent you from getting online. If you run into the “Windows could not detect this network’s proxy settings” message every time you reboot, you may be a victim of this.
You should thus run a scan with a trusted anti-malware app, such as Malwarebytes. This will detect any viruses or other malware running on your system and get rid of them. If the scan finds any infections, take the recommended action and see if your connection works as normal again.

9. Utilize a Restore Point

Windows 10 Restore Point
The System Restore feature in Windows lets you return to a previous point when your computer was working normally. If your issues started recently, you should try this to see if you can go back in time.
Search for Control Panel in the Start Menu to open it. If Category is selected in the top-right, switch to Small or Large icons and choose the System entry.
Next, click System protection on the left sidebar. In the resulting dialog box, click System Restore to open a new window. Windows will walk you through choosing a restore point and confirming the operation. Of course, if your computer hasn’t created any restore points, you can’t use this feature.
Note that using a restore point will remove any programs and drivers you installed since making that restore point. You can click Scan for affected programs on a restore point to see what effect it will have. A System Restore won’t affect any of your personal information.

10. Reset Your Network Settings

Windows 10 Network Reset
After trying everything above, you should resort to a full reset of your network options. You’ve already spent a lot of time working on this, and a reset should clear whatever persistent problem is blocking your connection.
Thankfully, Windows 10 makes it easy to reset your whole configuration. Open Settings > Network & Internet. On the Status tab, find Network reset at the bottom and click this.
Be aware that this will remove all network information from your computer, so you’ll need to reconnect to saved networks again. If you’re OK with this, click Reset now. Your computer will perform the reset, then restart.

More on Network Troubleshooting

Now you know what to do when Windows cannot detect proxy settings. All network errors are frustrating, but you should be able to clear this one up without much work. It’s most important to make sure that you have a proxy turned off (if you don’t use one) or configured properly (if you do use one).
Otherwise, some standard network troubleshooting should have you all patched up. We have an extensive guide to Windows network troubleshooting if you need more help.

2020年3月29日 星期日

Win10 Setting for L2TP VPN

As title. Below is the solution:

Win10 無法連線至 Synology VPN Server

Jul 20, 2017 · 3 min read
之前公務電腦剛換成 Windows 10 後,就有發現內建的 VPN 連線沒辦法連回家裡的 Synology VPN Server,不過因為想繞過的東西通常是網站,而 SSH tunnel 還是可以穩定運作,所以也就置之不理,但最近為了 prepare 以後可能會用到的狀況,還是研究了一下怎麼解決。

症狀

我在 Synology DS213+ with DSM 6.1 上安裝了官方的 VPN Server package,前面接了一台 Wifi 分享器,有開 UDP 500, 1701, 4500 的 port-forwarding。(參考:Synology 服務使用哪些網路連接埠?)
在手機上或是 Mac 筆電都可以正常連線 VPN,所以排除是 VPN server, 或是 firewall, port forwarding 之類的問題,Windows 10 的 VPN 設定也是正確的,使用 L2TP/IPSec,填了正確的金鑰,但會出現下列錯誤:

新增 Registry 機碼解決

查了一下,似乎是個從 Vista 時代就一直有的錯誤(也太古老了吧?!),Microsoft 官方的說明在:How to configure an L2TP/IPsec server behind a NAT-T device in Windows Vista and in Windows Server 2008
解決方法是在 Registry 裡增加一個新的機碼:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent 新增一個 32-bit DWORD,名稱為 AssumeUDPEncapsulationContextOnSendRule 然後把值設為 2
理論上要重開機才會生效,不過我試了兩台 Windows 10,一台沒重開也 OK 就是了。Anyway, 如果發現沒有效果就重開試試吧!

其他安全性設定

基本上這樣 VPN 就可以連線了,不過還是有一些安全性的設定可以調整。在連線的設定裡,「安全性」標籤,資料加密欄位改為「需要加密(如果伺服器拒絕就中斷連線)」(預設是「可省略加密」),另外允許這些通訊協定的選項,只勾選「MS-CHAP v2」,如下圖:
如此一來,連上 VPN 就可以繞過一些惱人的問題啦!

From: 
https://medium.com/@tsaiid/win10-%E7%84%A1%E6%B3%95%E9%80%A3%E7%B7%9A%E8%87%B3-synology-vpn-server-a4fea4558221