2022年4月8日金曜日

ネットワーク設定他

# /etc/fstab
# Created by anaconda on Sat Nov 14 23:13:46 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/cl-root / xfs defaults 0 0
UUID=c72f5956-86d1-4c0f-ad6e-2df2d4dbc925 /boot ext4 defaults 1 2
/dev/mapper/cl-swap swap swap defaults 0 0
/dev/vdb1 /u01 xfs defaults

timedatectl set-timezone Asia/Tokyo

nmcli d
nmcli c

nmcli general hostname firewall
nmcli c delete internet
nmcli c add type ethernet ifname enp1s0 con-name "internet" ethernet.mtu 1500
nmcli c mod internet ipv4.method auto
nmcli c mod internet connection.autoconnect yes
nmcli c up internet

VLAN=vlan_monitor
VLAN_IP=192.168.254.220/24
nmcli c delete $VLAN
nmcli c add type ethernet ifname enp2s0 con-name "$VLAN"
nmcli c mod $VLAN ipv4.addresses $VLAN_IP
nmcli c mod $VLAN ipv4.method manual
nmcli c mod $VLAN connection.autoconnect yes
nmcli c mod $VLAN ipv4.dns 8.8.8.8
nmcli c mod $VLAN ipv4.gateway 192.168.254.254
nmcli c up $VLAN

VLAN=vlan_global
VLAN_IP1=192.168.220.101/24
VLAN_IP2=192.168.220.102/24
VLAN_IP3=192.168.220.103/24
VLAN_IP4=192.168.220.104/24
nmcli c delete internet_global
nmcli c add type ethernet ifname enp3s0 con-name "$VLAN"
nmcli c mod $VLAN ipv4.addresses $VLAN_IP1
nmcli c mod $VLAN +ipv4.addresses $VLAN_IP2
nmcli c mod $VLAN +ipv4.addresses $VLAN_IP3
nmcli c mod $VLAN +ipv4.addresses $VLAN_IP4
nmcli c mod $VLAN ipv4.method manual
nmcli c mod $VLAN connection.autoconnect yes
nmcli c up $VLAN

VLAN=vlan_api_front
VLAN_IP=192.168.10.2/24
nmcli c delete $VLAN
nmcli c add type ethernet ifname enp4s0 con-name "$VLAN"
nmcli c mod $VLAN ipv4.addresses $VLAN_IP
nmcli c mod $VLAN ipv4.method manual
nmcli c mod $VLAN connection.autoconnect yes
nmcli c up $VLAN

VLAN=vlan_web_front
VLAN_IP=192.168.20.2/24
nmcli c delete $VLAN
nmcli c add type ethernet ifname enp5s0 con-name "$VLAN"
nmcli c mod $VLAN ipv4.addresses $VLAN_IP
nmcli c mod $VLAN ipv4.method manual
nmcli c mod $VLAN connection.autoconnect yes
nmcli c up $VLAN

VLAN=vlan_dmz_front
VLAN_IP=192.168.30.2/24
nmcli c delete $VLAN
nmcli c add type ethernet ifname enp6s0 con-name "$VLAN"
nmcli c mod $VLAN ipv4.addresses $VLAN_IP
nmcli c mod $VLAN ipv4.method manual
nmcli c mod $VLAN connection.autoconnect yes
nmcli c up $VLAN

# systemctl restart NetworkManager
# ip addr show

0 件のコメント:

コメントを投稿

zabbix7 amazon linux2023 インストール postgres15

【postgres】 dnf -y install postgresql15-server postgresql15-server-devel postgresql-setup initdb passwd postgres vi `find / -name pg_hba.con...