• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Hướng dẫn đổi port trên VPS CentOS 6.8

Admin

Well-Known Member
Staff member
Administrator
Hôm nay mình xin hướng dẫn các bạn cách đổi port cho CentOS 6.8
Để đổi port VPS bạn làm như sau nhé

Chạy lệnh
Code:
vi /etc/ssh/sshd_config

Bạn tìm

Code:
#Port 22#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

Và sửa như sau

Code:
[COLOR=#ff0000]Port 1234[/COLOR]
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

Trong đó 1234 là port cần thay nhé

38449088084_eabc298ce4_o.png


Sau đó chạy tiếp các lệnh sau

Code:
service iptables stop
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport [COLOR=#ff0000]1234[/COLOR] -j ACCEPT
service sshd reload
service iptables save
service iptables start

Thay 1234 thành port bạn muốn thay


25290709338_d3dcdd45a2_o.png


Chúc các bạn thành công
Nguồn tuoitreit.vn
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top