den myos Posted May 22, 2009 Report Share Posted May 22, 2009 at my work we have a old mandrake 9.2 server, it runs smoothly, so no reason to upgrade it. But lately it seems that we can get't on swedish websites. I would like to change the dns to eliminate that as the problem. But since its a old version of mandrake and i am not a Linux guru at all, (windows man) i have no idea how to do it. I have access to webadmin and uses winscp to log on the server remote. any help would be appreciate thx Quote Link to comment Share on other sites More sharing options...
tux99 Posted May 23, 2009 Report Share Posted May 23, 2009 (edited) If I understand your problem correctly you need to look at the /etc/resolv.conf file. It contains the IP adress(es) of the DNS server(s) used by this machine to resolve hostnames into IP addresses. Just change the IP address(es) in that file (you need to edit the file as 'root' user) to whatever you need them to be. The change will apply immediately, nothing needs to be restarted or rebooted. Edited May 23, 2009 by tux99 Quote Link to comment Share on other sites More sharing options...
scarecrow Posted May 23, 2009 Report Share Posted May 23, 2009 Add to your /etc/resolv.conf these two IP's, on top of the list: nameserver 208.67.222.222 nameserver 208.67.220.220 The are the DNS servers of opendns, which are very fast and do not block any websites, unless you set them to do so. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 25, 2009 Report Share Posted May 25, 2009 Is this Mandrake 9.2 server providing internal DNS services for you? If so, which is what I think you're trying to say from your post, then you'll be wanting to change the bind config and not the /etc/resolv.conf. You can use the opendns servers for the forwarder addresses and you just need to be editing /etc/named.conf and look for an entry forwarders and in this section will be ip addresses listed for domain names not managed by you internally. Quote Link to comment Share on other sites More sharing options...
den myos Posted May 26, 2009 Author Report Share Posted May 26, 2009 Is this Mandrake 9.2 server providing internal DNS services for you? If so, which is what I think you're trying to say from your post, then you'll be wanting to change the bind config and not the /etc/resolv.conf. You can use the opendns servers for the forwarder addresses and you just need to be editing /etc/named.conf and look for an entry forwarders and in this section will be ip addresses listed for domain names not managed by you internally. Your are right, the only thing the server does is run as a dhcp. We ended up changing the DNS in the etc/dhcpd.conf and that seem to help. But for some reason ssh stop working, and now i can't log on remote.? Did we accindentally change something else also.? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 26, 2009 Report Share Posted May 26, 2009 You can check by doing: netstat -tunlp | grep 22 to see if port 22 for SSH is listening. Of course, assuming SSH was using the default config and port set up. If not, then try: service sshd restart and then repeat the netstat command to see if it's listening correctly. Changing the DNS on DHCP, depending on which server address you now have means your internal DNS is now obsolete and not required. Now there is a chance you may have been using internal DNS resolution for some of your systems - of which you might find out if people cannot connect to them anymore. If not, then just using external DNS is fine. It would be worth checking the /etc/named.conf file to see if you have any zone files configured in here, and if so if they were providing anything. If it was just for resolving external DNS via your DNS server such as a DNS proxy - then you'll be fine just changing the DHCP as you did do. Otherwise, you might want to edit the named.conf file and change the forwarders instead and revert your DHCP DNS settings and see if it works. If not, then either the internal DNS (named) is no longer running, or something. Quote Link to comment Share on other sites More sharing options...
den myos Posted May 27, 2009 Author Report Share Posted May 27, 2009 You can check by doing: netstat -tunlp | grep 22 to see if port 22 for SSH is listening. Of course, assuming SSH was using the default config and port set up. If not, then try: service sshd restart and then repeat the netstat command to see if it's listening correctly. Changing the DNS on DHCP, depending on which server address you now have means your internal DNS is now obsolete and not required. Now there is a chance you may have been using internal DNS resolution for some of your systems - of which you might find out if people cannot connect to them anymore. If not, then just using external DNS is fine. It would be worth checking the /etc/named.conf file to see if you have any zone files configured in here, and if so if they were providing anything. If it was just for resolving external DNS via your DNS server such as a DNS proxy - then you'll be fine just changing the DHCP as you did do. Otherwise, you might want to edit the named.conf file and change the forwarders instead and revert your DHCP DNS settings and see if it works. If not, then either the internal DNS (named) is no longer running, or something. Im not getting anything when i use those commands. But when i start up the server it says i have a error in etc/ssh/sshd_config and something about line 3 and localhost. (the start up screen is moving really fast) But when i check the file, the file only contains information about what the file does, nothing more. I also spottet a error in crond,,, im just guessing here. (the start up screen is moving really fast) doesn't mandrake a service where you can see all the boot errors, like windows have the log. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 27, 2009 Report Share Posted May 27, 2009 Yes, you can check /var/log/messages which should have all the start up info in it and failed problems. Please check line 3 of sshd_config and tell us what it is, or alternatively, post here and perhaps we can help. Quote Link to comment Share on other sites More sharing options...
den myos Posted May 28, 2009 Author Report Share Posted May 28, 2009 Yes, you can check /var/log/messages which should have all the start up info in it and failed problems. Please check line 3 of sshd_config and tell us what it is, or alternatively, post here and perhaps we can help. The sshd_config file. # $OpenBSD: ssh_config,v 1.16 2002/07/03 14:21:05 markus Exp $# This is the ssh client system-wide configuration file. See# ssh_config(5) for more information. This file provides defaults for# users, and the values can be changed in per-user configuration files# or on the command line.# Configuration data is parsed as follows:# 1. command line options# 2. user-specific file# 3. system-wide file# Any configuration value is only changed the first time it is set.# Thus, host-specific definitions should be at the beginning of the# configuration file, and defaults at the end.# Site-wide defaults for various options# Host *# ForwardAgent no# ForwardX11 no# RhostsAuthentication no# RhostsRSAAuthentication no# RSAAuthentication yes# PasswordAuthentication yes# HostbasedAuthentication no# BatchMode no# CheckHostIP yes# StrictHostKeyChecking ask# IdentityFile ~/.ssh/identity# IdentityFile ~/.ssh/id_rsa# IdentityFile ~/.ssh/id_dsa# Port 22# Protocol 2# Cipher 3des# Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc# EscapeChar ~Host * ForwardX11 yes Protocol 2 StrictHostKeyChecking no I have no idea what its says,,, Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 28, 2009 Report Share Posted May 28, 2009 From that there are no line breaks, so I can't tell what is supposed to be on line 3. Can you edit the above post and format it correctly so that we can see how it should look? In case you want to compare it against the one on the server, on the server you can do: cat /etc/ssh/sshd_config and then see how it appears on screen and make the above look the same. Quote Link to comment Share on other sites More sharing options...
den myos Posted May 28, 2009 Author Report Share Posted May 28, 2009 From that there are no line breaks, so I can't tell what is supposed to be on line 3. Can you edit the above post and format it correctly so that we can see how it should look? In case you want to compare it against the one on the server, on the server you can do: cat /etc/ssh/sshd_config and then see how it appears on screen and make the above look the same. there was no line 3 in the file,,, it was 1 long continnius line.!!! I was very confuse myself. I have no idea of what to make of it. I will try you code tomorrow. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 28, 2009 Report Share Posted May 28, 2009 Hmm, very strange - sounds like we do have a problem there. Something else you can try: find / -name sshd_config* and we can see if there is another version somewhere like sshd_config~ that we might be able to revert to that is still in working order. Quote Link to comment Share on other sites More sharing options...
den myos Posted May 29, 2009 Author Report Share Posted May 29, 2009 Hmm, very strange - sounds like we do have a problem there. Something else you can try: find / -name sshd_config* and we can see if there is another version somewhere like sshd_config~ that we might be able to revert to that is still in working order. There is one here, /usr/share/man/man5/sshd_config.5.bz2 But when i unzip it, it asked if i wanna overwrite the old one.. not really sure if i wanna do that.? Quote Link to comment Share on other sites More sharing options...
den myos Posted May 29, 2009 Author Report Share Posted May 29, 2009 There is one here, /usr/share/man/man5/sshd_config.5.bz2 But when i unzip it, it asked if i wanna overwrite the old one.. not really sure if i wanna do that.? I guess thats the manual file i got a whole of.. ;) Woulden it be easier to reinstall the ssh, from the ground up. Or is it very difficult? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted May 29, 2009 Report Share Posted May 29, 2009 It would be, only that Mandrake 9.2 is old so you might not be able to find the rpm anymore to reinstall it after removing it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.