2010-09-24
How to Setup Ubuntu Server on Rackspace
Rackspace上にUbuntuサーバを作る度に、iptables設定やssh portの番号を変更するやり方を忘れてしまい、右往左往してしまうので、ちょっと今回のサーバ立て直しを機にメモをしときます。もし同じような境遇の人がいたら参考にしてください。
The following instructions are my memos for initial setup Ubuntu 10.04 server on Rackspace. After initializing, I often change my port number, because servers on Rackspace are often attacked by the port scan, so I recommend to change your port no. as soon as possible after your initializations.
Setup Ubuntu Server
================
0. Any information on Ubuntu 10.04 Server can be found in the following page.
http://cloudservers.rackspacecloud.com/index.php/Ubuntu_10.04_LTS_(Lucid)
1. Follow the articles to setup.
http://cloudservers.rackspacecloud.com/index.php/Ubuntu_-_Setup
2. Change your port number to make your server secure.
# emacs /etc/ssh/sshd_config
# What ports, IPs and protocols we listen for
#Port 22 <--- Comment out
Port 12345 <--- Change port number as you wish
# /etc/init.d/ssh restart
# iptables -I INPUT -p tcp -m tcp --dport 12345 --syn -j ACCEPT
# /etc/init.d/ssh restart
# iptables-save > /etc/iptables.rules
3. Try to login the server from your computer.
$ ssh -p 12345 YOUR_UBUNTU_SERVER
If you can login your server, it's done.
Your server is now able to avoid from the port scan attack
Option: For Printing Japanese
=========================
$ apt-get install language-pack-ja
$ dpkg-reconfigure locales
$ update-locale LANG=ja_JP.UTF-8
Option: Print error message in English
# echo 'export LC_MESSAGES="en_US.UTF-8"' >> ~/.profile
References:
1. LANDISK HACKING DIARY
2. Ubuntuでロケール(ja_JP.eucjp)追加, なんとなくメモ
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿