Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна

Разрешить подключение по SSH только с одного IP, с помощью IPTABLES

Данная процедура проделывается довольно просто, предположим что iptables установлен и запущен.

Для начало просмотрим все правила которые созданны в iptables

iptables -L --line-numbers

если вы не вносили не какие изменения, то это должно выглядеть вот так

в 4-й строке(в цепочке INPUT) распологается правило разрещающее подключаться по SSH, его необходимо удалить, но необязательно

Довайте добавим в начало цепочки INPUT правило которое будет разрешать подключение по SSH с IP, например,

iptables -I INPUT 1 -p tcp --dport 22 -s -j ACCEPT

а теперь добавим правило которое будет запрещать подключение по SSH совсех остальных IP

iptables -I INPUT 2 -p tcp --dport 22 -j DROP

 ВАЖНО: Проделовать действия необходимо именно в той последовательности в которой описанно в данной статье, если вы с начало добавите запрещающее правило то доступ по SSH будет утерян

ещё раз посмотрим правила iptables 

iptables -L --line-numbers

если всё сделанно правильно то список должен выглядеть вот так

 теперь удалите 6-ю строку, хотя это не обязательно

iptables -D INPUT 6

теперь сохраните настройки iptables

service iptables save

Как видите это совсем не сложно


0 #24 mega888 malaysia 18.01.2019 19:10
The web writers typically have specialties. Go ahead and take time to discover a all the
details needed. Lastly, don't be satisfied after reaching
a good position inside of the market.
0 #23 live22 download 18.01.2019 10:00
The to be able to make money from blogging are many and
very simple to put into service. If visitors only spend 2 seconds in relation to your
page and click on away, seems bad. Myspace offers you the opportunity to share classifieds.
0 #22 918kiss ong 16.01.2019 17:16
It's OK if you don't have the page ranking yet.
you can always build that with quality content.
In addition, they can also reduce the page level. They are in effect my colleagues
on the web.
0 #21 ace 333 15.01.2019 03:34
Wonderful items from you, man. I have understand your stuff
previous to and you're simply extremely great. I actually like what you have got here, certainly like what you are
saying and the best way through which you say it.
You are making it entertaining and you still care for to stay
it sensible. I can not wait to read much more from you.
That is really a great website.
0 #20 3win8 14.01.2019 19:12
Make sure to insert a website link back to your website when you submit the articles.
Do some blog commenting, do submitting of social bookmarks and some
creative approaches.
0 #19 cool gadgets 14.01.2019 16:01
Gambling's got streaks of luck both ways.
They all adhere to the basic rules of poker on-line.

Try online electronic poker games to discover how it usually is a better gaming site for
0 #18 flash games present 14.01.2019 15:48
Playing throughout the Internet may also be
considering. Online slot games are quite different via the real ones.
In the free mode they allows you some free casino credits, possess no cash value.
0 #17 live22 apk 14.01.2019 00:11
This web site really has all of the information and facts I needed about
this subject and didn't know who to ask.
0 #16 newtown ntc33 14.01.2019 00:08
After going over a handful of the blog articles on your site, I honestly appreciate your way of writing a blog.
I saved it to my bookmark website list and will be checking back soon. Please check
out my website too and let me know your opinion.
0 #15 live casino gambling 13.01.2019 23:19
After looking into a handful of the blog articles on your website, I honestly appreciate your way of blogging.
I book-marked it to my bookmark website list and
will be checking back in the near future. Please visit
my website too and tell me what you think.

Добавить комментарий

Защитный код