0

So, I was tasked to chagen SSH port in a CentOS server. As I did in the configuration file, the service failed to start, so after a little research I found that I should make some changes in selinux, so it would allow the default port to be changed.

So all I'd have to do is to run the commmand:

semanage port -a -t ssh_port_t -p tcp <port>

But when I do, I get the following error:

Invalid protocol Bad portcon declaration at /etc/selinux/targeted/tmp/modules/100/base/cil:669 OSError: Error

When I try to run the command

semanage port -l

I get the following error:

`libsepol.ipproto2sepol: invalid protocol 132 found in policy (No such file or directory).
libsepol.port_to_record: could not convert port range 1 - 511 (???) to record (No such file or directory).
libsepol.sepol_port_iterate: could not iterate over ports (No such file or directory).
libsemanage.dbase_policydb_list: list handler could not extract record (No such file or directory).
libsemanage.dbase_policydb_list: could not list records (No such file or directory).
OSError: No such file or directory`

I've download all the necessary packages in order for this to work.

Your Answer

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

Browse other questions tagged or ask your own question.