I was having some difficulty getting my sshd and port forwarding on my
Linux server to work; I was receiving "administratively prohibited"
errors. Something gave me the sense that name resolution was the
issue, so I checked my local caching DNS and I have name resolution for
the host I want to forward to and my /etc/resolv.conf points to this
caching DNS.
So I have:
$ nslookup foo.local
Server: 192.168.10.2
Address: 192.168.10.2#53
Name: foo.local
Address: 192.168.10.3
/etc/resolve.conf:
domain local
search local
nameserver 192.168.10.2
nameserver 192.168.10.1
nameserver 68.8.7.100
And just for good measure in /etc/ssh/sshd_config, I have "UseDNS yes"
even though that is supposed to be a default. (And restarted sshd).
But when I try to do this from another machine:
$ ssh -l foobar -L 8080:foo.local:8080 server
and then set my browser to use an HTTP proxy of:
http://localhost:8080
(and there is a proxy server running on foo.local or 192.16.10.3 at
port 8080)... I get "administratively prohibited" in my ssh shell
window on server, and a long timeout where the browser just sits until
it times out. (server = 192.168.10.2 where the DNS caching server
sits.)
When I go into server:/etc/hosts and add an entry for "192.168.10.3
foo.local", then everything works!! So it seems like sshd is NOT doing
DNS lookups for name resolution. Anyone seen anything like this
before? I mean, having an entry in server:/etc/hosts is not really
desirable, considering my DNS lookup is working (seemingly according to
nslookup above), but... It does solve the problem. It just looks like
sshd isn't doing lookups after all for some reason...? :-(
/usr/ceo