hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
24.95k stars 6.28k forks source link

MacBook access error #14

Closed uname-yang closed 8 years ago

uname-yang commented 8 years ago

in iPhone the VPN is well,but the macbook can't use it. I can login with the macbook ,but the network is not well.i can't get google through the vpn from china.

hwdsl2 commented 8 years ago

Unfortunately this may be a limitation of the China GFW firewall which interferes with VPN traffic. See the following link for information about some alternative VPN software that you can try:

https://www.lowendtalk.com/discussion/75491/anything-new-out-there-for-burning-through-the-chinese-great-firewall

hwdsl2 commented 8 years ago

If you want to add further details about the error or have other comments, feel free to reply. I am closing this as it does not seem to be an issue with the VPN script itself.

uname-yang commented 8 years ago

sorry ,my server is on the aws ec2.i think it is not about the firewall .ios can use it.just the Mac is not well.do you test your Vpn server in Mac OS?it can login,but the network is not well.

hwdsl2 commented 8 years ago

Do you see any error message on the Mac? Please run the following command on the VPN server and post the output. If it is too long you can make a GitHub Gist and paste the link here.

grep pluto /var/log/auth.log

hwdsl2 commented 8 years ago

My previous comment should say auth.log not syslog. Also, double check that your have configured the Mac OS VPN client correctly. Follow all steps in the linked guides. Enter your server IP in "Server Address", VPN username in "Account Name", VPN password in "Password", and IPsec PSK in "Shared Secret". When finished, reboot your Mac. Then try connecting again.

https://www.hideipvpn.com/setup/how-to-setup-l2tp-vpn-on-mac-os-x/ https://www.privateinternetaccess.com/pages/client-support/osx10.10-l2tp

uname-yang commented 8 years ago

i am sure the mac client is no problem. i also use other vpn on it .i will work on it this night.

hwdsl2 commented 8 years ago

Hi @uname-yang, I looked into this further and it seems to be a bug in Mac OS X with DNS resolution. Please try the following workaround:

  1. Connect to the IPsec/L2TP VPN.
  2. Choose Apple menu > System Preferences, then click Network.
  3. Select the VPN network connection in the list, then click Advanced.
  4. Click Options. Make sure that "Send all traffic over VPN connection" is checked.
  5. Click DNS, then click Add (+) at the bottom of the DNS Servers list. Enter 8.8.8.8 (which is Google Public DNS). Also add 8.8.4.4
  6. When you’re finished, click OK.
  7. Now select the Wi-Fi (or Ethernet if you use that) network connection in the list, then click Advanced.
  8. Click DNS, then click Add (+) at the bottom of the DNS Servers list. Enter 8.8.8.8 (which is Google Public DNS). Also add 8.8.4.4
  9. When you’re finished, click OK.
  10. Now re-connect the VPN and test if you can open websites such as Google.

Let me know if this resolves the issue for you.

References: 1: https://www.privateinternetaccess.com/forum/discussion/17776/mac-osx-10-11-el-capitan-breaks-vpn 2: http://osxdaily.com/2015/12/05/change-dns-server-settings-mac-os-x/ 3: https://serverfault.com/questions/274882/cant-resolve-host-through-vpn-connection-from-mac-os-x 4: https://forum.fortinet.com/tm.aspx?m=128036

hwdsl2 commented 8 years ago

@uname-yang Forgot to attach the images in my previous reply. See below.

change-dns-mac-os-x-610x519 zugvm set-change-add-dns-servers-mac-os-x-610x512

uname-yang commented 8 years ago

Thank you. it is good now