2

I use surfshark vpn and I'd like to figure out which network interface it is using when I connect to it. On Windows, this is simple. I just type ipconfig and can easily locate it. On MacOS, I type ifconfig but there are a thousand network adapters and I cant figure out which surfshark is using. Thanks so much for any help!

2 Answers 2

1

Run ifconfig -v to see your network interfaces. This verbose version of the command will sometimes add the VPN name to the appropriate network interface. IF that doesn't work, continue on.

You can check what your external IP address is without activating your VPN, then check it again after activating to ensure VPN is turned on.

One you're sure VPN is working, then look for the interface that appears / disappears when turning on / off VPN. Alternatively, look for the interface that matches your external IP address.

here's how i do it:

  1. Turn off VPN and go to a site that shows your IP address. This is your real IP address, not the masked one your VPN provides. e.g. https://whatismyipaddress.com/
  2. Note your IP4 or IP6 address. You won't need to actually use this info, just be able to recognize if it's different after you activate your VPN.
  3. Activate VPN
  4. Refresh the site that shows your IP address. It should show an IP different than the one in step 2. This is your VPN-enabled IP address, e.g. the one your VPN provides. Take a note of this.
  5. Run the command ipconfig and look for the interface with the ip address from step 4. The interface name is the letters and numbers left of the semi-colon above the IP address. e.g. if utun0: is above the IP address, the interface name is utun0.
  6. (optional) check your ip6 or ip4 address against what your VPN says it is. Some VPNs offer tools for this.
1
  • happy to see you mention this... I also just had the idea to see compare results in 2 terminal windows side by side with vpn on and off and see which interface appears... that should be the vpn one...
    – mihai
    Oct 7, 2023 at 3:51
0

You use the command ifconfig all by itself. It will display all configured network interfaces and their IP addresses. VPNs are typically in the class A private network space 10.0.0.0/8. That is any IP that starts with 10. But that's not 100% of the time! Just use your best judgement to pick which one is the VPN interface. It should be named in some way related to the VPN provider's name.

2
  • Oh, thank you! Does this sound right? It's under 'ipsec0'. inet 10.5.1.58 --> 10.5.1.58 netmask 0xffffffff (numbers slightly changed in case it matters as I am very dumb with this stuff lol). Interestingly, I can torrent a (legal, free) file using either en0 or ipsec0, but no other network interfaces when the vpn is on. Why is that?
    – chart
    Feb 21, 2022 at 4:14
  • @ chart Regardless of which interface you send on, one is behind the other, so they both go over the vpn. But it's good to check the vpn. Just type, 'my ip' in google. It should be the vpn servers ip facing the internet. There are also online tools to check for dns leaks and other exploitable defects in the vpn connection. Also, set up the vpn so there are no connections allowed without the vpn, called vpn kill switch.
    – Brian
    Feb 22, 2022 at 7:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .