Table of Contents

Настройка образов виртуальных машин

Время UTC, админ пользователь root

Перед экспортом системы:

Windows

Debian/Ubuntu

Установка

# ifconfig eth0 inet 172.16.1.13/24

# route add default gw 172.16.1.254

# dhclient eth0

Настройка

$ sudo -i

# passwd

# cat /etc/ssh/sshd_config
...
PermitRootLogin yes
...
# cat /etc/default/grub
...
GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0"
...
# update-grub
# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

#auto eth0
#iface eth0 inet static
#        address 192.168.X.Y
#        netmask 255.255.255.0
#        gateway 192.168.X.1

#auto eth1
#iface eth1 inet static
#        address 172.16.1.X
#        netmask 255.255.255.0
#        gateway 172.16.1.254

#auto eth2
#iface eth2 inet static
#        address 192.168.100+X.1
#        netmask 255.255.255.0
# cat /etc/hosts
127.0.0.1       localhost

#192.168.X.1     gate.corpX.un gate
#192.168.X.10    server.corpX.un server

172.16.1.254     proxy
# cat /etc/dhcp/dhclient.conf
...
timeout 10;
...
# cat .bashrc
...
export EDITOR=nano
#export EDITOR=mcedit
...
PS1=...\H...
#PS1='${debian_chroot:+($debian_chroot)}\H:\w\$ '
...
# apt remove resolvconf

# cat /etc/resolv.conf
#search corpX.un
nameserver 172.16.1.254
# apt update && apt upgrade

# apt autoremove

# apt install mc vim sudo less nano

# apt install net-tools dnsutils netcat curl lsof man tcpdump lshw

# apt install python python-apt git
# apt install python3 python3-apt git

# git clone http://val.bmstu.ru/unix/conf.git

# ln -s conf/net_server.sh net_server.sh

# ln -s conf/net_gate.sh net_gate.sh

FreeBSD

RAM 512, HD 16GB, Part: / 1500M, остальное SWAP

Установка

Настройка

# passwd

# cat /etc/ssh/sshd_config
...
PermitRootLogin yes
...
# pkg update

# pkg install mc-light

# pkg install vim-lite

# pkg install wget

# pkg install curl
# cat /etc/resolv.conf
#search corpX.un
nameserver 172.16.1.254
# cat /etc/rc.conf
#hostname="gate.corpX.un"

ipv6_network_interfaces=none
#ifconfig_em0="inet 192.168.X.1/24"
#ifconfig_em1="inet 172.16.1.X/24"
#ifconfig_em2="192.168.100+X.1/24"

#defaultrouter="172.16.1.254"
#gateway_enable="YES"

sshd_enable=yes
# cat /etc/hosts
127.0.0.1      localhost.corpX.un localhost

#192.168.X.1    gate.corpX.un gate
#192.168.X.10   server.corpX.un server

172.16.1.254   proxy
172.16.1.254   rep
# cat .cshrc
...
setenv  EDITOR  ee
setenv  PAGER less
...
#setenv  HTTP_PROXY http://proxy:3128
...
  set prompt = "[%M:%c3] # "
  set autolist
...
  set history = 10000
  set savehist = (10000 merge)
...

Сборка ядра с патчем от Сергея Варнавы

Модули MAC

Удаление истории команд и ключей ssh

# rm /etc/ssh/ssh_host_*

# <Ctrl-D>

# rm .history