[GH-ISSUE #304] Public IP for agent sometimes shows IPV6 #2137

Closed
opened 2026-03-14 02:43:30 +03:00 by kerem · 5 comments
Owner

Originally created by @bbrendon on GitHub (Mar 3, 2021).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/304

I think this is happening mostly for remote agents. I could care less about their IPV6 IP. I do care about their IPv4 IP :)

I'm guessing the Windows API is just passing along the first thing it finds.

Originally created by @bbrendon on GitHub (Mar 3, 2021). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/304 I think this is happening mostly for remote agents. I could care less about their IPV6 IP. I do care about their IPv4 IP :) I'm guessing the Windows API is just passing along the first thing it finds.
kerem closed this issue 2026-03-14 02:43:35 +03:00
Author
Owner

@bradhawkins85 commented on GitHub (Mar 3, 2021):

Not a fix but a workaround for now:
You can run the command below using Send Command on these agents to get the IPv4 address.

nslookup myip.opendns.com. resolver1.opendns.com

<!-- gh-comment-id:789439275 --> @bradhawkins85 commented on GitHub (Mar 3, 2021): Not a fix but a workaround for now: You can run the command below using Send Command on these agents to get the IPv4 address. nslookup myip.opendns.com. resolver1.opendns.com
Author
Owner

@bbrendon commented on GitHub (Mar 3, 2021):

I dug around and found where is is being done. No idea why because I dunno how to fix... except one idea.... remove ipv6 from icanhazip.tacticalrmm.io :)

I'm not sure how you tell go to prefer ipv4 over ipv6.

github.com/wh1te909/rmmagent@1e54c45d23/agent/utils.go (L27)

<!-- gh-comment-id:789444649 --> @bbrendon commented on GitHub (Mar 3, 2021): I dug around and found where is is being done. No idea why because I dunno how to fix... except one idea.... remove ipv6 from icanhazip.tacticalrmm.io :) I'm not sure how you tell go to prefer ipv4 over ipv6. https://github.com/wh1te909/rmmagent/blob/1e54c45d23854232a4a3e5c0b71ca79ab1473e47/agent/utils.go#L27
Author
Owner

@wh1te909 commented on GitHub (Mar 3, 2021):

hi the icanhaz code is here xD https://github.com/wh1te909/icanhazip/blob/master/main.go i'll change it to prefer ipv4 and only return v6 if it's really using v6 and has no v4

<!-- gh-comment-id:789526728 --> @wh1te909 commented on GitHub (Mar 3, 2021): hi the icanhaz code is here xD https://github.com/wh1te909/icanhazip/blob/master/main.go i'll change it to prefer ipv4 and only return v6 if it's really using v6 and has no v4
Author
Owner

@bbrendon commented on GitHub (Mar 3, 2021):

I was thinking the change would be on the client. If it requests IPv6, then how can icanhaz know if it is dual stack ? Unless maybe you have the client do two requests? One for ipv4 and one ipv6.

<!-- gh-comment-id:789899337 --> @bbrendon commented on GitHub (Mar 3, 2021): I was thinking the change would be on the client. If it requests IPv6, then how can icanhaz know if it is dual stack ? Unless maybe you have the client do two requests? One for ipv4 and one ipv6.
Author
Owner

@wh1te909 commented on GitHub (Mar 9, 2021):

Hi changed it to prefer v4 and only return v6 if really not using v4, it will be in next rmm/agent release

<!-- gh-comment-id:793496329 --> @wh1te909 commented on GitHub (Mar 9, 2021): Hi changed it to prefer v4 and only return v6 if really not using v4, it will be in next rmm/agent release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#2137
No description provided.