Forum Discussion
Irule to get host name from ip
Hi All,
i need to send a wakeup command to computer when users connect to the ssl vpn portal.
wakeup command is a url that ends with "hostname" exemple: https://server/Services/SimpleWakeup.aspx?Name=comp1
i have all the ip's of the computers on pager attribute in Active Directory. %{session.ad.last.attr.pager}
dig command give me the hostname i need.
exemple: dig +short -x 192.168.1.1
how can i integrate the dig command (or other solution) to a variable , when any user connect to the apm portal?
- spalande
Nacreous
Something sort of below. You can either try to set a new variable for computer host or use a variable directly from the iRule.
Modify as needed. DNS server (8.8.8.8) would be your internal DNS or you can also use VIP.
when ACCESS_ACL_ALLOWED { set pager [ACCESS::session data get "session.ad.last.attr.pager"] set serverhost [RESOLV::lookup @8.8.8.8 -ptr $pager] ACCESS::session data set "session.logon.computername" $serverhost }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com