Archive for the ‘NET DHCP FireWALL’ Category
Create Network Bonding On CentOS 7
Bond .Create Network Bonding On CentOS 7 Метод соединения , комбинирования двух и более интерфейсов . Возможности — отказоустойчивость , скорость.
ifcfg-bond0
DEVICE=bond0
NAME=bond0
TYPE=bond
ONBOOT=yes
BOANDING_MASTER=YES
USERCTL=no
BOOTPROTO=none
IPADDR=192.168.101.17
PREFIX=24
GATEWAY=192.168.101.254
BONDING_OPTS=»mode=1 miimon=100″
ifcfg-enp1s0f0
HWADDR=»xx:…..»
TYPE=»Ethernet»
BOOTPROTO=»none»
DEFROUTE=»yes»
PEERDNS=»yes»
PEERROUTES=»yes»
IPV4_FAILURE_FATAL=»no»
IPV6INIT=»yes»
IPV6_AUTOCONF=»yes»
IPV6_DEFROUTE=»yes»
IPV6_PEERDNS=»yes»
IPV6_PEERROUTES=»yes»
IPV6_FAILURE_FATAL=»no»
NAME=»enp1s0f0″
UUID=»5dce86a1-05ba-4211-9772-e401276aecbe2f»
ONBOOT=»yes»
MASTER=bond0
SLAVE=yes
ifcfg-enp1s0f1
Подобный предыдущему.
Статья- http://www.unixmen.com/linux-basics-create-network-bonding-on-centos-76-5/
Установка webmin на centos 7
Создаем файл vi /etc/yum.repos.d/webmin.repo
с содержимым [Webmin] name=Webmin Distribution Neutral #baseurl=http://download.webmin.com/download/yum mirrorlist=http://download.webmin.com/download/yum/mirrorlist enabled=1 Устанавливаем ключ
rpm --import http://www.webmin.com/jcameron-key.asc Для обновления репозиторий
yum check-update Установка
yum install webmin Дополнительно доступ через firewall
firewall-cmd --add-port=10000/tcp
Управлять по адресу http://hostname:10000
Проверка компьютеров сети на доступность по порту 5900
#!/bin/bash
list=`nmap -p5900 192.168.1.0/24 -oG — |grep 5900/open | cut -d’ ‘ -f 2`
shablon=
for addr in $list
do
echo $addr
done
-oG
(grepable вывод)<имя_файла>
http://nmap.org/book/output-formats-grepable-output.html
Изменения для Centos 7
LAMP Stack
Very similar to CentOS-6.x install, pretty sure that mysql is an alias for mariadb.
yum -y install mariadb mariadb-server mariadb-devel yum -y install httpd php php-mbstring php-mysqli php-dom php-gd systemctl enable httpd mariadb systemctl start httpd mariadb
/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h `uname -n` password 'new-password' history -c # clear history echo "grant SELECT,LOCK TABLES,SHOW VIEW on *.* to backup@localhost; flush privileges;" | mysql -uroot -p mysql # backup acct for mysqlutil backup
systemctl enable httpd.service systemctl start httpd.service systemctl is-active httpd.service # check status systemctl enable mariadb.service systemctl start mariadb.service /usr/lib/mysql_secure_installation # follow prompts to tighten up the install
systemctl list-unit-files | grep -i network systemctl stop NetworkManager systemctl disable NetworkManager
yum install autofs nfs-utils systemctl enable autofs systemctl start autofs systemctl reload autofs
firewall-cmd --zone=public --add-port=http/tcp --permanent # open http to public zone firewall-cmd --reload # reload firewalld rules so that things take effect
# plug in USB stick ls -lrt /dev/sd* # find the recently inserted USB stick, should have the base entry and a single partition entry (ie: sdc and sdc1) mount -t vfat /dev/sdb1 /mnt cd /mnt install.sh # now have a script to do the following #rpm -ivh kmod-forcedeth*.rpm # I want to get some other scripts onto this volume as well to help get this currently network challenged system going AFTER we complete the install #cp -rip /mnt/forcedeth-followup /root/
vi /etc/default/grub # add "net.ifnames=0" to GRUB_CMDLINE_LINUX line sudo grub2-mkconfig -o /boot/grub2/grub.cfg reboot
Изменение имени сетевого интерфейса на ethX
Необходимо:
- Добавить «net.ifnames=0″ and «biosdevname=0″ as kernel arguments to grub
- In ‘/etc/sysconfig/network-scripts/’ Change your configured NIC config file to ‘ifcfg-ethX’
- If you have multiple interfaces and want to control naming of each device rather than letting the kernel do in its own way, /etc/udev/rules.d/60-net.rules seems necessary to override /usr/lib/udev/rules.d/60-net.rules.