Jump to content

Weird problem when my ISP changes my IP.


MottS
 Share

Recommended Posts

Hi all. This is a very annoying problem and I hope someone will understand what is going on because I don't :cry:

 

My server (the one that has my drunden tux on it .. right at your left) connects to the net with an ADSL connection (dhcp). Usually, I receive 66.36.*.* as IP. Now this server shares the internet connection with computers connected to it via a hub (configured via the MCC). Everything is working fine.

 

But then, don't know why, the server stops sharing the net when my ISP changes my IP to something sike 217.92.*.*. If I login on the server with SSH and try to browse somewhere with 'lynx', I always get 'connection refused' .. but 'adsl-status' shows that the connection is up and running. Now if I stop the net connection and reconfigure it via the MCC, I can connect to the net with the server. However, the clients cannot connect .. the server does not share the net anymore! So I have to plug the monitor and keyboard to it and reconfigure everything... I hate it! This happened twice in 1 month (last time 5 minutes ago).

 

Anyone have a clue of what is going on?

 

MOttS

Link to comment
Share on other sites

In most setups, where windows machines are involved especially, the first two values of your gateway (i.e 1.2.3.4) must be the same for internet sharing as the rest of your network.

 

There is a workaround for it, but I'm not sure how to tackle it, anyone else?

Link to comment
Share on other sites

No windows machine here. Only Mac OS and Linux. And the IP of my gateway does not change .. only my ADSL address as specified above. eth0 (10.0.0.10) is connected to an ADSL modem. The ADSL service receives an IP (different from time to time .. the problem) from my ISP. eth1 (192.168.1.0) is connected to the LAN. Gateway address is ALWAYS 192.168.1.1.

Link to comment
Share on other sites

from my server

[gd@localhost gd]$ cat /etc/resolv.conf

search localdomain AEI

nameserver 206.123.6.10

nameserver 206.123.6.11





# ppp temp entry

nameserver 206.123.6.11 # ppp temp entry

nameserver 206.123.6.10 # ppp temp entry

[gd@localhost gd]$ cat /etc/hosts

10.0.0.10               localhost.localdomain localhost

192.168.1.1             localhost.localdomain localhost

127.0.0.1       localhost.localdomain   localhost

192.168.0.1             localhost.localdomain localhost

From my computer on the LAN

gd@localhost gd $ cat /etc/resolv.conf

nameserver 192.168.1.1

search homeland.net

gd@localhost gd $ cat /etc/hosts

# /etc/hosts:  This file describes a number of hostname-to-address

#              mappings for the TCP/IP subsystem.  It is mostly

#              used at boot time, when no name servers are running.

#              On small systems, this file can be used instead of a

#              "named" name server.  Just add the names, addresses

#              and any aliases to this file...

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.7 2002/11/18 19:39:22 azarah Exp $

#



127.0.0.1       localhost

192.168.1.100   localhost.localdomain

 

What's wrong with those files? .. and how are they related to my problem?

Link to comment
Share on other sites

Can't see anything wrong with those files. To me, a weird thing is that your LAN breaks when ISP assigns a different IP to the server...

 

When that happens next time, check outputs of ifconfig and route on both the server and clients for default gateway.

Link to comment
Share on other sites

Forgive me since I don't know anything about ip routing, but does your server have any kind of dns software installed? Do you think this is a side effect of tmdns or whatever it is? If your clients are using 192.168.1.1 for the nameserver that means the server needs to have a DNS server of some kind, no?

I guess if you change the nameserver from your clients to a real dns server maybe it can work better...

 

Again.. forgive me if I am just talking nonsense.

Link to comment
Share on other sites

Hey DragonMage .. that make sense.

 

When that problem arise, the computers on my lan cannot access the net (with dns) .. but I will try to use IPs instead. I'll try something like

http://216.239.39.99

and see if it work (this is Google). I say that it make sense because in my Windows days, I had to provide my ISP's DNS to the computer on my LAN so that they could access the web. XP wasn't able to 'share' the net as cleanly as Mandrake does.

 

But if that is the case, where do I put the DNS address in /etc ? ... I know how to do that for the MAC OS X machine but not my machine actually.

Link to comment
Share on other sites

For private subnets and static IP addresses, you don't have to run a dns server, 'cause names can be resolved using hosts file. I don't have dns server running. As long as static IP addresses are listed in /etc/hosts and /etc/lmhosts (for samba), everything works fine. I think that its a routing or NAT problem 'cause things go wrong after ISP assigns different IPs. Once you've been assigned a different IP, you must change the default gateway as well.

Link to comment
Share on other sites

I had to provide my ISP's DNS to the computer on my LAN so that they could access the web. XP wasn't able to 'share' the net as cleanly as Mandrake does.

 

But if that is the case, where do I put the DNS address in /etc ?

That's already been done:

gd@localhost gd]$ cat /etc/resolv.conf

search localdomain AEI

nameserver 206.123.6.10

nameserver 206.123.6.11





# ppp temp entry

nameserver 206.123.6.11 # ppp temp entry

nameserver 206.123.6.10 # ppp temp entry

You may want to try to add these lines to /etc/resolv.conf on the clients...

Link to comment
Share on other sites

Ok. So I will run TWO tests next time that problem arise.

 

1) Try to access webpages with IP

 

2) Put the DNS of my ISP in /etc/resolv.conf of my computer (client) and restart the network (client).

 

Thanks guys .. I appreciate your help

 

MOttS

Link to comment
Share on other sites

I had a problem with using ICS between my Linux box (the dhcp server) and my WinXP box (client) and I had to actually put the real dns server IPs in /etc/dhcpd.conf rather than the local ip of my dhcp server. For some reason it wasn't accepting the dns servers listed in my /etc/resolv.conf file, even though the man pages said that it should.

Link to comment
Share on other sites

That happened again :evil:

 

So I tried

1) Try to access webpages with IP

Did not work. So not a DNS problem.

 

Then I tried

2) Put the DNS of my ISP in /etc/resolv.conf of my computer (client) and restart the network (client).

Didn't work either.

 

So WTF is the problem? .. well, I was able to access the web from my server (using LYNX) but not from the clients on the network. So I 'service shorewall restart' and BAM .. everything started to work again.

 

I like it :P

 

MOttS

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...