Re: howto use curl to get Internet IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



max wrote:
Jim wrote:
Dave Burns wrote:
On Fri, Jun 6, 2008 at 7:48 AM, Jim <mickeyboa@xxxxxxxxxxxxx> wrote:
I want to use  curl to get my Internet IP address, and getting it to
ddclirent.
Using getip.com and dyndns.org to get my IP for ddclient, isn't working out, they shutout ddclient after awhile from getting my Internet IP to
send to dyndns.org .
I understand curl can get the Internet IP for ddclient, does anyone know of
a  HowTo to show me how to do this ?


1) if you insist on this approach, here's a hint:curl -o - http://getip.com/ 2>/dev/null|grep 128
Replace 128 with some part of your IP number that you're confident
will not change. In the example, I used the left 3 digits of my IP
number. Use sed or awk to scrape off the crud that wget will spew out
along with the IP number.

2) why not just use /sbin/ifconfig -a? Your machine knows its own IP
number as well or better than getip.com.

3) why not man curl? That is, read the man page of the command you are
asking about. You don't sound like you've even tried to do your
homework.

Dave

What approach would you suggest that is better to use ?
I have a DSL AP 2Wire783 in front of my computer that does not have the capability of giving me the Internet IP.


You sure about that? I'll admit I have only used about 4 or 5 different dsl modems but all of them could be put in bridging mode.

You are correct, it is in the bridge mode , but I can only get ddclient to get internal IP 192.168. etc, not Internet IP.

Below is my ddclient.conf.

 ######################################################################
## 
## $Id: sample-etc_ddclient.conf 2 2006-05-22 19:37:19Z wimpunk $
##
## Define default global variables with lines like:
## 	var=value [, var=value]*
## These values will be used for each following host unless overridden
## with a local variable definition.
##
## Define local variables for one or more hosts with:
## 	var=value [, var=value]* host.and.domain[,host2.and.domain...]
##
## Lines can be continued on the following line by ending the line
## with a \
##
##
## Warning: not all supported routers or dynamic DNS services 
##          are mentioned here.
##
######################################################################
daemon=9600
syslog=yes
pid=/var/run/ddclient/ddclient.pid
use=fw,fw=172.16.0.1/,fw-skip='IP Address' web=
login=mickeyboa
password=serci1
mickeyboa.homedns.org
protocol=dyndns2
server=members.dyndns.org
wildcard=YES
#use=if, if=eth0
#example.dyndns.org
#custom=yes, example.com


#daemon=300				# check every 300 seconds
#syslog=yes				# log update msgs to syslog
#mail=root				# mail all msgs to root
#mail-failure=root			# mail failed update msgs to root
#pid=/var/run/ddclient/ddclient.pid		# record PID in file.
#ssl=yes					# use ssl-support.  Works with
					# ssl-library
#
#use=watchguard-soho,        fw=192.168.111.1:80	# via Watchguard's SOHO FW
#use=netopia-r910,           fw=192.168.111.1:80	# via Netopia R910 FW
#use=smc-barricade,          fw=192.168.123.254:80	# via SMC's Barricade FW
#use=netgear-rt3xx,          fw=192.168.0.1:80		# via Netgear's internet FW
#use=linksys,                fw=192.168.1.1:80		# via Linksys's internet FW
#use=maxgate-ugate3x00,      fw=192.168.0.1:80		# via MaxGate's UGATE-3x00  FW
#use=elsa-lancom-dsl10,      fw=10.0.0.254:80		# via ELSA LanCom DSL/10 DSL Router
#use=elsa-lancom-dsl10-ch01, fw=10.0.0.254:80		# via ELSA LanCom DSL/10 DSL Router
#use=elsa-lancom-dsl10-ch02, fw=10.0.0.254:80		# via ELSA LanCom DSL/10 DSL Router
#use=alcatel-stp,            fw=10.0.0.138:80           # via Alcatel Speed Touch Pro
#use=xsense-aero,            fw=192.168.1.1:80          # via Xsense Aero Router
#use=allnet-1298,            fw=192.168.1.1:80          # via AllNet 1298 DSL Router
#use=3com-oc-remote812,	     fw=192.168.0.254:80	# via 3com OfficeConnect Remote 812
#use=e-tech,                 fw=192.168.1.1:80          # via E-tech Router
#use=cayman-3220h,           fw=192.168.0.1:1080        # via Cayman 3220-H DSL Router
#
fw-login=admin,             fw-password=cersi40		# FW login and password
#
## To obtain an IP address from FW status page (using fw-login, fw-password)
#use=fw, fw=192.168.1.254/status.htm, fw-skip='IP Address' # found after IP Address
#
## To obtain an IP address from Web status page (using the proxy if defined)
#use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address
#
#use=ip,                     ip=127.0.0.1	# via static IP's
#use=if,                     if=eth0		# via interfaces
#use=web					# via web
#
#protocol=dyndns2				# default protocol
#proxy=fasthttp.sympatico.ca:80			# default proxy
#server=members.dyndns.org			# default server
#server=members.dyndns.org:8245			# default server (bypassing proxies)

#login=your-login				# default login
#password=test					# default password
#mx=mx.for.your.host				# default MX
#backupmx=yes|no				# host is primary MX?
#wildcard=yes|no				# add wildcard CNAME?

##
## dyndns.org dynamic addresses
##
## (supports variables: wildcard,mx,backupmx)
##
# server=members.dyndns.org,		\
# protocol=dyndns2			\
# your-dynamic-host.dyndns.org

##
## dyndns.org static addresses
##
## (supports variables: wildcard,mx,backupmx)
##
# static=yes,				\
# server=members.dyndns.org,		\
# protocol=dyndns2			\
# your-static-host.dyndns.org

##
##
## dyndns.org custom addresses
##
## (supports variables: wildcard,mx,backupmx)
##
# custom=yes,				\
# server=members.dyndns.org,		\
# protocol=dyndns2			\
# your-domain.top-level,your-other-domain.top-level

##
## ZoneEdit (zoneedit.com)
##
# server=www.zoneedit.com, 		\
# protocol=zoneedit1,			\
# login=your-zoneedit-login,  		\
# password=your-zoneedit-password	\
# your.any.domain,your-2nd.any.dom

##
## EasyDNS (easydns.com)
##
# server=members.easydns.com, 		\
# protocol=easydns,			\
# login=your-easydns-login,  		\
# password=your-easydns-password	\
# your.any.domain,your-2nd.any.domain

##
## Hammernode (hn.org) dynamic addresses
##
# server=dup.hn.org,             	\
# protocol=hammernode1,         	\
# login=your-hn-login,           	\
# password=your-hn-password      	\
# your-hn-host.hn.org,your-2nd-hn-host.hn.org

##
## dslreports.com dynamic-host monitoring
##
# server=members.dslreports.com		\
# protocol=dslreports1,			\
# login=dslreports-login,		\
# password=dslreports-password		\
# dslreports-unique-id

##
## OrgDNS.org account-configuration
##
# use=web, web=members.orgdns.org/nic/ip
# server=www.orgdns.org 		\
# protocol=dyndns2 			\
# login=yourLoginName 			\
# password=yourPassword 		\
# yourSubdomain.orgdns.org

##
## dnspark.com
## (supports variables: mx, mxpri)
##
# use=web, web=ipdetect.dnspark.com, web-skip='Current Address:'
# protocol=dnspark,			\
# server=www.dnspark.com,		\
# your-host.dnspark.com

##
## NameCheap (namecheap.com)
##
# protocol=namecheap,				\
# server=dynamicdns.park-your-domain.com,	\
# login=my-namecheap.com-login,			\
# password=my-namecheap.com-password		\
# myhost.namecheap.com 

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux