티스토리 뷰

--------------------------------------------------------------- 

수동 ip 설정

/etc/network/interfaces 에 아래와 같은 형식으로 설정

auto lo

iface lo inet loopback

 

auto eth0

iface eth0 inet static

address 192.168.0.111

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1

dns-nameservers 168.126.63.1 168.126.63.2

 

auto eth1

iface eth1 inet dhcp

 

네임서버 설정

/etc/resolv.conf

nameserver 8.8.8.8

nameserver 168.126.63.1



- IP V6 disable 절차

sudo vi /etc/sysctl.conf , 아래 내용 추가

 


#disable ipv6

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

 

sudo sysctl -p




- 기본 준비 : 최초 설치 이후에 방화벽 올리고 업데이트

sudo ufw enable

sudo ufw allow ssh

sudo apt-get update

sudo apt-get upgrade

 

 


 

 


 

 

- 불필요한 tty 제거

sudo vi /etc/default/console-setup

 

ACTIVE_CONSOLES="/dev/tty[1-6]" -> ACTIVE_CONSOLES="/dev/tty[1-2]"

 

cd /etc/init

sudo mv tty3.conf tty3.conf.bak

sudo mv tty4.conf tty4.conf.bak

sudo mv tty5.conf tty5.conf.bak

sudo mv tty6.conf tty6.conf.bak

 

 

 

- 패키지 관리

https://help.ubuntu.com/community/AptGet/Howto

 

sudo apt-get install xxx

sudo aptitude install

 

apt-get update

apt-get upgrade

apt-get dist-upgrade

apt-get check

 

apt-get -f install

apt-get autoclean

apt-get clean

 

apt-get remove xxx

apt-get purge xxx

 

 

- 방화벽 설정 관련

ifdown eth0    - 랜카드 다운

 

sudo ufw enable

sudo ufw default deny

sudo ufw allow ssh

sudo ufw allow http

sudo ufw allow https

 

sudo ufw deny from 121.121.121.121 to port 22

sudo ufw deny from 121.0.0.1/24 to any port 22

 

sudo ufw status

 





 

 


끝.


댓글