I want to have ssh access to server14 through port x, and block port 22.
On my desktop, I give the command: 'ssh -p x server14', where x is above 1024.
On server14, i changed /etc/ssh/sshd_config to listen to port x (Port=x)
With switched-off the iptables on server14, I can connect with ssh. But if I have iptables running, with rule: -A INPUT -p tcp --dport x -j ACCEPT, I cannot connect.
The logging on server 14 says:
Code:
Dropped by firewall INPUT: IN=eth0 OUT=<snip> PROTO=TCP SPT=42225 DPT=22 WINDOW=14600 RES=0x00 SYN URGP=0
Whatch the DPT=22.
How is that possible??
On the desktop, I can run 'ssh -v -v -p x server14', I get:
Code:
OpenSSH_5.6p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to server14 [192.168.1.74] port x.
So connecting to port x, not 22.....
How can I connect to server14, only through port x?