Forum Discussion

Aviv's avatar
Icon for Cirrus rankCirrus
Apr 19, 2021

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. %{}

dig command give me the hostname i need.

exemple: dig +short -x

how can i integrate the dig command (or other solution) to a variable , when any user connect to the apm portal?

1 Reply

  • 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 ( would be your internal DNS or you can also use VIP.

    set pager [ACCESS::session data get ""]
    set serverhost [RESOLV::lookup @ -ptr $pager]
    ACCESS::session data set "session.logon.computername" $serverhost