Hi,
For some reason, after I unplugged my box's network connection and plugged it back in, the bot won't connect to ANY servers. I can Telnet to it fine and the box can FTP out, but it just won't connect. Im running 1.6.10 on redhat 7.3... I tried powering down the computer and such. Nothing else has changed. This is a sample of what happens:
[14:52] Trying server irc.homelien.no:6667
[14:52] Connected to irc.homelien.no
[14:52] Disconnected from irc.homelien.no
These three things all happen in about a second.. i have no idea what could be wrong. Any help would be greatly appreciated! Thanks
marc
hmm... this is the error i could see, but i dont know what it means:
-------------
Trying server irc.secsup.uu.net:6667
DNS resolved irc.secsup.uu.net to 24.147.1.10
net: connect! sock 6
Connected to irc.secsup.uu.net
net: eof!(write) socket 6 (Connection refused,111)
Disconnected from irc.secsup.uu.net
-------------
I have no idea whats gone wrong.. as i said before, nothing else in the configuration has changed. all i did was unplug the network connection (and yes, it is plugged in right now =)
Does this happens if you use an IRC client as well? One cause could be (tho very remote because you said ftp works fine) is that you have a dynamic ip/hostmask (DHCP) and while playing with connection cable, your network adapter renewed the licence while your bot's config file keeps trying to use the old one. Like i said, it is very unlikely problem is exactly like i described, but something tells me i am preety close with my guess.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
What darko means is that your external IP address has changed (external DHCP not internal), and you specify a static IP address in your .conf (my-ip, nat-ip and so on) thus the server is refusing you for giving it the wrong IP address.
This is highly possible. Do an ifconfig -a and check your .confs.
Ok.. I did the service network restart thing as you said to do. Now it won't access anything. Before i could FTP and get to websites.. now it doesn't connect. It's weird though, because I restarted the computer twice before this.
It's getting really confusing now.. heh. After doing the 'service network restart', nothing works at all, but the bot only gets timeout errors from connecting to servers (instead of the immediate disconnection) but when I restarted the computer again (after doing the service restart) I can access things outside of the box like FTP's again, but the bot errors still persist.
Here they are again.. if you would like to see them =D
Trying server irc.secsup.uu.net:6667
DNS resolved irc.secsup.uu.net to 24.147.1.10
net: connect! sock 7
connected to irc.secsup.uu.net
net: eof!(write) socket 7 (Connection refused,111)
Disconnected from irc.secsup.uu.net
That IP number is (as I'm sure you already know) an internal Private Network IP number and can not get out on the internet directly without going through some form of NAT or DHCP server with an external address, you say that you can ftp from the box, do you mean out on to the internet, if so, what connection has the Linux box got out to the internet coz it sure as hell aint that one.
Regards
Ian-Highlander
"Insanity Takes Its Toll, Please Have Exact Change"
As noted in the previous post, your connection is not directly via your ethernet connection. It has to go through some form of router, that does NAT translation.
The router, can include a proper router doing NAT, a second machine going forwardinging or NAT.
As such, you need to make sure you have the correct IP addresses inside your config file. This is not evidently clear inside the config file.
In situations, where the machine has the external IP address direcly assigned to the machine, as used in routed networks, modems, USB & PCI card DSL connections, and as provided with most shell providers, you can simply use the external IP address of the machine, or an added one if it's a V-host, in the my-ip setting
In NAT situations, such as routed DSL, or corporate networks, you will need to pick specific IP addresses, for certain settings. You should set my-ip to the ethernal IP address, in your case 192.168.1.5. You will then need to set the value of nat-ip to the IP address of your external connection (the public IP).
NOTE: If you use DHCP to assign your machine a IP address, then you may have trouble, and will have to check and set the value of my-ip each time. I strongly recomend using a static IP.
NOTE: The same applies to the nat-ip. If your ISP assigns you a different IP each time, and after a certain time period, this value will need to be changed.
Ok, i checked the my-ip and nat-ip settings, and they're all what they should be. My external ip address hasnt changed. I use a router to connect my computers to the internet..
So unless im misunderstanding something.. or misreading something...
Anyway, when i said telnetting, i meant that friends outside of the LAN could telnet into the box with the connection problem and get onto the bots partyline, even though it can't connect to a server. AND the bot can FTP to websites (just to test the network connection). I also tried telnetting with the box to a server, and i keep getting this error:
Heres an update, I telnet'd again and I can actually connect to the servers and chat on channels on the same box the bot is on. What the heck could possibly be wrong? Nat-ip is right.. theres an ident..