SSH via DHCP server

Posted by SFault on Server Fault See other posts from Server Fault or by SFault
Published on 2012-11-23T06:41:00Z Indexed on 2012/11/28 5:07 UTC
Read the original article Hit count: 495

Filed under:
|

I have a DHCP server setup and I can't seem to connect to anything through SSH.

When I'm logged in to the server itself, I can SSH. But when I connect any machine to the DHCP server, that machine can SSH but every server I SSH to asks for a password when the normal behavior (when not connected to the DHCP server) does not.

Here are the contents of my iptables script that are related to port 22.

$IPT -t nat -A PREROUTING -i $LAN -p tcp --dport 22 -j REDIRECT --to-port 22
$IPT -A FORWARD -i $LAN -p tcp --dport 22 -j ACCEPT
$IPT -A INPUT -i $LAN -p tcp --dport 22 -j ACCEPT
$IPT -A INPUT -i $WAN -p tcp --dport 22 -j ACCEPT
$IPT -A OUTPUT -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
$IPT -A INPUT -i $LAN -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT

Am I missing something?

© Server Fault or respective owner

Related posts about ssh

Related posts about iptables