Re: RH8/Apache -- Host Resolution Error
From: Douglas Clinton (see_my_sig_at_devnull.com)
Date: 11/17/03
- Next message: NoneOfBusiness: "Fedora install problems"
- Previous message: DL: "mount command in fstab"
- In reply to: Brandon Niemczyk: "Re: RH8/Apache -- Host Resolution Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 16 Nov 2003 21:43:56 -0500
On Mon, 17 Nov 2003 01:20:49 +0000, Brandon Niemczyk wrote:
> On Mon, 17 Nov 2003 01:19:44 +0000, Brandon Niemczyk wrote:
>
> im sorry not 'ipconfig' it should be 'ifconfig'
Here is a perl script to find out your WAN IP, the one your ISP gave you.
You can use it along with the command "host yourdomain.com" then update
your DNS service providers settings via their web page or whatever method
they have.
Its also a good idea to add the DNS service providers DNS server to your
list of dns servers.
------------------
#!/usr/bin/perl
# This is a perl version of Robin Keir's IP2 at http://keir.net/ip2.html
# it gets your Wan IP address and provate IP address if you have one
#
# This script is for GNU/linux and BSD if you are running windows, use Robin Keir's
# program at the site above.
#
# This script will print out your WAN address and name as seen from a host outside
# your internal network
# This is useful for those behind a NAT router and need to know the Internet view of
# your host, useful for various filesharing apps and IRC stuff
#
# The following is a list of servers you can use/try if you need to substitute
# the default ecerami.com address
#
# http://ecerami.com/servlet/coreservlets.ShowCGIVariables
# http://www.sanford.com/introcgi/cgi-bin/environment-example.pl?something
# http://www.mueloliva.es/cgi-bin/variables.cgi?'0024'
# http://inetarena.com/cgi-bin/environment.pl?this=that
# http://curry.edschool.virginia.edu/go/www_uses/demos/cgi-test.html
# http://www.cfhub.com/examples/cgi/
#
# This script was created by Douglas Clinton declinton@sympatico.ca
# It is disrtibuted inder the GNU GPL if it doesnt work send me an email
# If you think that this script has damaged your computer get a brain scan...it can't
#
# Douglas Clinton
use LWP::Simple;
# First lets get the info we need from our favorite site
@url=get("http://ecerami.com/servlet/coreservlets.ShowCGIVariables");
# This section Finds the match for the WAN IP
foreach $i (@url) {
if ($i =~ /(\d+)(\.\d+){3}/) {
@stuff = $i;
#print "$i";
$string = $i;
$string =~ s/<([^>]|\n)*>//g ; # removes html tags
@stuff = $string;
#print "\n$string";
}
}
@words = split " ", $string;
$raw_addr = $words[13];
$raw_name = $words[14];
$clean_addr = substr($raw_addr, 11, 13);
# this next line prints the your WAN address
print "$clean_addr\n";
$clean_name = substr($raw_name, 11, 45);
# this nest line prints your WAN name
print "$clean_name\n";
------------------------
Good Luck
-- GNU/Linux is God get used to it declinton@sympatico.ca Linux User # 276385
- Next message: NoneOfBusiness: "Fedora install problems"
- Previous message: DL: "mount command in fstab"
- In reply to: Brandon Niemczyk: "Re: RH8/Apache -- Host Resolution Error"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|