This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Dynamic IPs and NAT settings in Config file

Old posts that have not been replied to for several years.
Locked
K
KevKev
Halfop
Posts: 67
Joined: Fri Oct 03, 2003 5:15 am

Dynamic IPs and NAT settings in Config file

Post by KevKev »

Has anybody written a code snipet to get the current public IP address of te connection a NATed bot is getting to the internet through from one of the IP finding webpages and to set said variables properly?

I haven't tried dcc'ing to my bot yet so i'm not certian i'll need it but i would think making sure the bot gets the proper IP address would be helpful :)

Another option sould be a bit of tcl to resolve a FQDN to ip address for that variable. I am using dyndns.org for dynamic dns and could simply do a reverse resolve to get the proper IP address.

Can the nat-ip settings be changed while the bot is running if perhaps my connection's ip address changes due to ao connection outage?

Sorry for all the lame questions but i've always run bots on static public addresses or had 1to1 NAT setup for them with static publics. I'm new to eggdrop with NAT and a Dynamic IP
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

from what i understand u want to return ur ip in channel or on a webpage right ?? or is it to dcc chat if its to dcc chat try settting myhost otherwize

check

Code: Select all

ip-to-country
script of mine there is an option [MyIP] this will return ur real ip the one u use to connect to irc and if this is still a lan ip then it will try to resolve it from root-servers.net

didn't use the one from tcl archive cause that one isn't the latest version
XplaiN but think of me as stupid
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

from what i understand u want to return ur ip in channel or on a webpage right ?? or is it to dcc chat if its to dcc chat try settting myhost otherwize

check ip-to-country script of mine there is an option [MyIP] this will return ur real ip the one u use to connect to irc and if this is still a lan ip then it will try to resolve it from root-servers.net

didn't use the one from tcl archive cause that one isn't the latest version

if you don't wana download the entire script then u can use the code in there and get it from my cvs
XplaiN but think of me as stupid
K
KevKev
Halfop
Posts: 67
Joined: Fri Oct 03, 2003 5:15 am

Post by KevKev »

I was looking for a way to get the real IP address of my connection.

Turns out that my firwall's connection tracking works quite nicely so i didn't even need to put anything there. As long as it resolved the hostname to internal IP Address correctly i was able to DCC Chat to the bot from both sides of the firewall. Internally i had to use "/ctcp chat Botname IPofDCCingComp" but externally everything worked as normal :)
Locked