It is currently December 15th, 2019, 6:29 am

network (Wired and Wireless) getting IP from VPN

General topics related to Rainmeter.
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

network (Wired and Wireless) getting IP from VPN

StealthNet » October 23rd, 2019, 4:30 am

Hi there!

Just start using rainmeter with the gadgets skin. Tbh it is a lot like an utility that I used more than 10 years ago... That feels good :)

Currently using on a notebook with the ExpressVPN installed. Like almost all VPN clients, i installs a VPN TAP.

Fact is, although the wired and wireless network meters find the proper interfaces, the local ip address is from the vpn adapter.

Is there a quick way of fixing it?

Thanks in advance!
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Posts: 617
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

SilverAzide » October 23rd, 2019, 12:34 pm

The way these Gadgets work (and the old Sidebar Gadgets too I think) is that the IP address that is shown is that of the "active" adapter (or in Rainmeter terminology, the "best" adapter). In your screenshot, the Gadgets are both showing your active IP address (the one Rainmeter says is being used). If your active adapter changes, then you will see these values change in BOTH gadgets.

You might want to experiment with configuring a gadget to specifically watch your VPN adapter only (the IPs shown will still be that of the active adapter, which many or may not be the VPN). Open the Settings and follow the link "How do I monitor a VPN?"

Hope this helps.
DeviantArt Gadgets More...
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

Re: network (Wired and Wireless) getting IP from VPN

StealthNet » October 23rd, 2019, 7:51 pm

Thank you for the clarification!

Is it possible to force the adapter from where it gets the ip address?
User avatar
SilverAzide
Posts: 617
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

SilverAzide » October 23rd, 2019, 10:39 pm

StealthNet wrote:
October 23rd, 2019, 7:51 pm
Thank you for the clarification!

Is it possible to force the adapter from where it gets the ip address?
Yes, it is, but be aware that the adapter might not actually be active, and your machine might not actually be using it at all. If that is OK with you, try the following:

1. Right-click the Network Meter skin and select Edit.
2. Find the following section of code:

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=Best
DynamicVariables=1
OnChangeAction=[!Log "Internal IP address change, refreshing external IP address" Notice][!CommandMeasure MeasureIPWeb "Reset"][!CommandMeasure MeasureIPWeb "Update"][!SetOptionGroup MeasureActiveNet Reload 0][!UpdateMeasure "CalcActiveInterface"]
3. Replace this entire section with this:

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#InterfaceEthernet#
OnChangeAction=[!Log "Internal IP address change, refreshing external IP address" Notice][!CommandMeasure MeasureIPWeb "Reset"][!CommandMeasure MeasureIPWeb "Update"][!SetOptionGroup MeasureActiveNet Reload 0][!UpdateMeasure "CalcActiveInterface"]
4. Refresh the skin.

This will always show the IP address returned by your Ethernet adapter. If your wireless adapter is active, your address will likely show as blank.
Last edited by SilverAzide on October 23rd, 2019, 10:53 pm, edited 1 time in total.
DeviantArt Gadgets More...
User avatar
SilverAzide
Posts: 617
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

SilverAzide » October 23rd, 2019, 10:48 pm

Also, if you want to "pin" the Wireless Meter's IP Address display to your wireless adapter, then edit the Wireless Meter and follow all the instructions above. Then change the line SysInfoData=#InterfaceEthernet# to SysInfoData=#InterfaceWireless#. Refresh the skin and your adapter will always show the IP address used by your wireless adapter (it will be blank if your adapter is inactive).
DeviantArt Gadgets More...
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

Re: network (Wired and Wireless) getting IP from VPN

StealthNet » October 23rd, 2019, 11:18 pm

Fantastic!

Working like a charm! THANK YOU!