0

I have a problem with my Raspberry, I'm a bit of a newbie with Raspbian so I prefer to ask to someone and really understand what I'm doing.

Actually, I've installed ufw succesfully on my Raspberry. I typed basics rules on it like:

sudo ufw allow from 192.168.1.0/24 to any port 22

I can use Putty to connect to my Raspberry on the port 22 But, the problem is when I'm trying to open another port like 2222 for exemple:

sudo ufw allow from 192.168.1.0/24 to any port 2222

Putty tell me that the connection is refused. I tried: sudo ufw disable sudo service ufw stop sudo service ufw start sudo ufw enable sudo ufw reload

I've even used: sudo ufw reset

To restart from a clean base but I got the same problem ^^' My final purpose is to open a port to allow my Rasp as a proxy via openvpn, but if can't even choose my ssh port it's a problem! Maybe I should restart the rasp to allow ufw to make the changes?

Thank you and sorry for my english level ^^'

  • Did you reload the rules after adding the port 2222 ssh rule? Did you restart SSH after changing the port? can you connect to SSH when the fireall is disabled? – Steve Robillard Oct 25 '16 at 20:17
  • Ok it seem that even with ufw disabled (sudo service ufw stop), I can't access in SSH by the 2222 port. – Coloniseur Oct 26 '16 at 6:40
  • A firewall is preinstalled on raspbian or? – Coloniseur Oct 26 '16 at 6:41
0

The problem was that I've changed /etc/ssh/ssh_config instead of /etc/ssh/sshd_config when I added a port in the SSH config file. --'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.