A
A
Artyom Pinul2016-03-15 17:30:39
SSH
Artyom Pinul, 2016-03-15 17:30:39

How to get SSH access to a Centos 6.5 server through an OpenWrt router?

Good afternoon.
There is a laptop with centos 6.5 installed, ip address 192.168.10.100 is registered in centos settings.
This laptop is connected to a router (which has OpenWrt firmware) with a wire that works in wds mode and receives Internet from another router via wi-fi.
1) I will not be able to connect from another computer via SSH to a server with centos 6.5.
(there are thoughts that port 22 is not open by default in the router in this firmware, but I don’t know how to open it).
2) For some reason, I can only go into the router settings via a wired connection.
3) For some reason, the router began to log out very quickly and you have to enter the password all the time.
Please help with connecting via ssh to the server with centos 6.5 ..
p/s: opened ports on the server with commands (but so far the same result):
su
iptables -I INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp -- dport 80 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT
iptables -I INPUT -p tcp --dport 25 -m state --state NEW -j ACCEPT
service iptables save
/etc/init.d/iptables restart

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2016-03-15
@CityCat4

-I INPUT -p tcp --dport 22 -j ACCEPT
-I OUTPUT -p tcp --sport 22 -j ACCEPT
It's not enough to open the incoming stream, you still need to remember the outgoing one. In addition, the router may well have NAT, which by default will nat everything. If you connect to the neighboring port of the router, do pings go to it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question