Forum Discussion

petras123_10972's avatar
petras123_10972
Icon for Nimbostratus rankNimbostratus
Apr 11, 2012

DNS resolve - hosts file

Hi All,

 

pleas help me.

 

I'm traying configure APM portal access, but I dont have any DNS server in DMZ. So I added records into hosts file (by GUI), but the APM doesn't work and in the session log is message "host.name.x.y" cannot be resolved. But ping from CLI works properly.

 

Do you have any idea please. THX
  • Hi Petras,

     

     

    If you don't get an answer here, I suggest opening a case with F5 Support.

     

     

    Aaron
  • Hello

     

    I have exactly the same problem. Is there any solution?

     

    Thanks

     

  • so this is hanging open.. i have the same problem. so is it that APM does not honor the host file and ONLY references DNS? Beginning to conclude that is the case (unfortunately). Very inconsistent with standard setups.

     

  • Currently host file not supported.

    One option may be to create a DNS virtual server locally, and use iRule to respond.

    when DNS_REQUEST {
    
       set ttl 60
       set A "[DNS::question name]. $ttl [DNS::question class] [DNS::question type]"
    
       switch [string tolower [DNS::question name]] {
          "www1.arsenal.com" {
               DNS::answer insert  "$A 10.10.10.10"    
            }
           "www2.arsenal.com" {
               DNS::answer insert  "$A 20.20.20.20"   
            }
        }
        DNS::return
    }
    
    • brad_11480's avatar
      brad_11480
      Icon for Nimbostratus rankNimbostratus
      fantastic solution. thanks. that will work just fine for what we need!
    • Aviv's avatar
      Aviv
      Icon for Cirrus rankCirrus
      Hi Kujan! could you explain\show the virtual server you have created? what do u mean "DNS virtual server locally" what is the type of the VS?
  • kunjan's avatar
    kunjan
    Icon for Nimbostratus rankNimbostratus

    Currently host file not supported.

    One option may be to create a DNS virtual server locally, and use iRule to respond.

    when DNS_REQUEST {
    
       set ttl 60
       set A "[DNS::question name]. $ttl [DNS::question class] [DNS::question type]"
    
       switch [string tolower [DNS::question name]] {
          "www1.arsenal.com" {
               DNS::answer insert  "$A 10.10.10.10"    
            }
           "www2.arsenal.com" {
               DNS::answer insert  "$A 20.20.20.20"   
            }
        }
        DNS::return
    }
    
    • brad_11480's avatar
      brad_11480
      Icon for Nimbostratus rankNimbostratus
      fantastic solution. thanks. that will work just fine for what we need!
    • Aviv's avatar
      Aviv
      Icon for Cirrus rankCirrus
      Hi Kujan! could you explain\show the virtual server you have created? what do u mean "DNS virtual server locally" what is the type of the VS?
  • Anyone know if there is a fix for this other than using the above Virtual/irule combination?