ok i have a question now when i add machines on network that are running unix do i add them in the /etc/hosts file also include them in dns (4 Replies)
Hi,
This is more of a verification rather than a question of technical nature.
This is based on solaris 10 machine
Could we use Virtual hosts (within our hosts file):
123.1.1.10 virtual_host_name
123.1.1.10 host_A
(note: 123.1.1.10 - host_A is also in our DNS server entry)
And... (0 Replies)
Originally I had the server at home and on Comcast so I used dyndns.org for DNS.
Once the server got a bit more popular, I leased a server at a colo facility. They set up the server name in their DNS so I didn't really have any reason to manage my own DNS. DynDNS was managing the domains and I... (7 Replies)
Hello!
How do I prevent AIX sendmail from doing a DNS lookup prior sending the mail?
(we still need to have the DNS resolving on AIX level).
We are running AIX 6.1 and 5.3.
//sap4ever (1 Reply)
Hi there,
I'm trying to do an MX type lookup using getaddrinfo(), but I can't work out how to change the lookup type to MX from the standard A - can anybody tell me how to do this?
Thanks very much
John G (3 Replies)
Hi there
i am not sure how to explain my problem.
i need to run a script to give me the results of all my unix hosts that do not have reverse lookup activated (for lack of a better word), i need to give this to out Server guys to add it part of the AD rules. So what i need is a script to... (0 Replies)
I am facing typical problem with apache as proxy. my solaris box was running with apache1.3, due to security issue i have updated to apache 2.2. I don't have any DNS set up onmy network. I was able to connect to internet apache 1.3 working as proxy server. http and https are working fine. when... (3 Replies)
Hi guys. Ok so let me lay out my configs. I can do a NSlookup from client to server BUT NOT a reverse lookup.
DNS server: Optimus.jaydomain.com
IP : 192.168.1.50
DNS Client: Megatron.jaydomain.com
IP : 192.168.1.60
On Sever:
# cat /etc/named.conf
//
// named.conf
//
// Provided... (4 Replies)
Hello,
For what purpose /etc/hosts file is used.I mean how any request coming to a DNS server or a switch would know that which name and ip are configured in /etc/hosts files of a server?
Best regards,
Vishal (3 Replies)
Hi.
Having a bit of quick fun putting some networking tools online.
Here is a DNS Lookup tool.
It's basically the DIG command line tool wrapped in forum formatting.
If you want more features, please post here.
I'm doing to make a few more network tools like this and move on to other... (1 Reply)
Discussion started by: Neo
1 Replies
LEARN ABOUT MOJAVE
net::netent
Net::netent(3pm) Perl Programmers Reference Guide Net::netent(3pm)NAME
Net::netent - by-name interface to Perl's built-in getnet*() functions
SYNOPSIS
use Net::netent qw(:FIELDS);
getnetbyname("loopback") or die "bad net";
printf "%s is %08X
", $n_name, $n_net;
use Net::netent;
$n = getnetbyname("loopback") or die "bad net";
{ # there's gotta be a better way, eh?
@bytes = unpack("C4", pack("N", $n->net));
shift @bytes while @bytes && $bytes[0] == 0;
}
printf "%s is %08X [%d.%d.%d.%d]
", $n->name, $n->net, @bytes;
DESCRIPTION
This module's default exports override the core getnetbyname() and getnetbyaddr() functions, replacing them with versions that return
"Net::netent" objects. This object has methods that return the similarly named structure field name from the C's netent structure from
netdb.h; namely name, aliases, addrtype, and net. The aliases method returns an array reference, the rest scalars.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your core functions.) Access these fields as variables named with a preceding "n_". Thus, "$net_obj->name()"
corresponds to $n_name if you import the fields. Array references are available as regular array variables, so for example "@{
$net_obj->aliases() }" would be simply @n_aliases.
The getnet() function is a simple front-end that forwards a numeric argument to getnetbyaddr(), and the rest to getnetbyname().
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
EXAMPLES
The getnet() functions do this in the Perl core:
sv_setiv(sv, (I32)nent->n_net);
The gethost() functions do this in the Perl core:
sv_setpvn(sv, hent->h_addr, len);
That means that the address comes back in binary for the host functions, and as a regular perl integer for the net ones. This seems a bug,
but here's how to deal with it:
use strict;
use Socket;
use Net::netent;
@ARGV = ('loopback') unless @ARGV;
my($n, $net);
for $net ( @ARGV ) {
unless ($n = getnetbyname($net)) {
warn "$0: no such net: $net
";
next;
}
printf "
%s is %s%s
",
$net,
lc($n->name) eq lc($net) ? "" : "*really* ",
$n->name;
print " aliases are ", join(", ", @{$n->aliases}), "
"
if @{$n->aliases};
# this is stupid; first, why is this not in binary?
# second, why am i going through these convolutions
# to make it looks right
{
my @a = unpack("C4", pack("N", $n->net));
shift @a while @a && $a[0] == 0;
printf " addr is %s [%d.%d.%d.%d]
", $n->net, @a;
}
if ($n = getnetbyaddr($n->net)) {
if (lc($n->name) ne lc($net)) {
printf " That addr reverses to net %s!
", $n->name;
$net = $n->name;
redo;
}
}
}
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.18.2 2013-11-04 Net::netent(3pm)