0

I took a working name server running bind 9 and fiddled around with the named.conf file. Then, because I wanted to be able to do further work remotely, I created a link /etc/rc2.d/S20ssh pointing to ../init.d/ssh) so it would run sshd when it boots. I copied the sshd_config file from the other name server we have (which already had sshd running).

Now, although I can ping the name server from anywhere, I can only get DNS lookups or ssh sessions from a machine on the same subnet. Access from elsewhere just times out.

netstat shows that the machine is listening on TCP port 53 on the eth0, hosts.allow and hosts.deny have no entries other than comments. I am not sure if my named.conf changes have caused the problem or if it is because sshd is running.

I am hoping that I have made some blindingly obvious novice mistake, so I won't burden you in this post with config files, logs etc. other than a abbreviated version of my named.comf.

Can anyone throw some light on why I have restricted access to the server or where I should look to find out?

Thanks,

Angus.

options {
directory "/var/cache/bind";
allow-transfer { none; };
auth-nxdomain no;
notify no;
};
logging {
category update { null; };
};
view "world" {
match-clients { any; };
recursion yes;
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
<Forward and reverse zones snipped>
};

2
Contributors
5
Replies
6
Views
10 Years
Discussion Span
Last Post by Angusm
0

Thanks alienlinux for replying.

I haven't (knowingly) made any changes to the firewall. I did try removing S20ssh from rc2.d so that ssh wouldn't start on boot, but that made no difference.

I think I must have changed something that has restricted access to services to internal clients only. What would do that? Something in inetd.conf?

0

ok lets go through this logically, first thing we need is sshd running, confirm that with

ps aux|grep sshd

if its there, then fine, if not, then run as root

/usr/sbin/sshd


next we need to ascertain that sshd is recieving connections ok, so

ssh <user>@127.0.0.1

if you can login, then all is well

next lets monitor the incoming packets to make sure that the packets are reaching the box from outside the domain

tcpdump -ni <interface> host <hosts ip> port 22

run ssh from outside the domain and check that packets are hitting the machine

from this point we should see one of two things, either the packets are not even reaching the box and therefore the problem would likely be with a router, or they are being dropped/refused by the machines firewall or refused by the ssh daemon


make sure port 22 is allowed, as for the sshd not allowing them, are you trying to connect as user or root? some distro's set PermitRootLogin to No

check your sshd.conf and if still nothing, let me know what you learned through all that :)
hope this helps

0

note, this is in no way an answer to your problem, just a short wander along the path.

we have to ascertain (seeing that ssh is broken too) that the problem isn't some place else and just happened to break at the same time
i have come across this :)

0

Alienlinux,

I have taken the route you suggested and determined that it is a firewall issue, which I have posted as another thread. Thanks for your help.

Angus.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.