mirror of
https://github.com/tommytran732/Linux-Setup-Scripts
synced 2024-11-21 17:11:33 -05:00
Split out network configs
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
77d7837854
commit
90eaa4aab1
@ -48,8 +48,8 @@ OPTIONS="-F 1"' | sudo tee /etc/sysconfig/chronyd
|
|||||||
sudo systemctl restart chronyd
|
sudo systemctl restart chronyd
|
||||||
|
|
||||||
# Setup Networking
|
# Setup Networking
|
||||||
echo -e '[device]\nwifi.scan-rand-mac-address=yes\n\n[connection]\nwifi.cloned-mac-address=random\nethernet.cloned-mac-address=random' | sudo tee /etc/NetworkManager/conf.d/99-random-mac.conf
|
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script/main/etc/NetworkManager/conf.d/00-macrandomize.conf -o /etc/NetworkManager/conf.d/00-macrandomize.conf
|
||||||
echo -e '[main]\nhostname-mode=none' | sudo tee /etc/NetworkManager/conf.d/01-transient-hostname.conf
|
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script/main/etc/NetworkManager/conf.d/01-transient-hostname.conf -o /etc/NetworkManager/conf.d/01-transient-hostname.conf
|
||||||
sudo nmcli general reload conf
|
sudo nmcli general reload conf
|
||||||
sudo hostnamectl hostname 'localhost'
|
sudo hostnamectl hostname 'localhost'
|
||||||
sudo hostnamectl --transient hostname ''
|
sudo hostnamectl --transient hostname ''
|
||||||
|
@ -28,7 +28,7 @@ sudo usg fix cis_level2_workstation
|
|||||||
# Remove AIDE
|
# Remove AIDE
|
||||||
sudo apt purge -y aide*
|
sudo apt purge -y aide*
|
||||||
|
|
||||||
# Allow su which is disabled by CIS
|
# Allow su which is disabled by CIS
|
||||||
sudo sed -i 's/auth required pam_wheel.so use_uid group=sugroup//g' /etc/pam.d/su
|
sudo sed -i 's/auth required pam_wheel.so use_uid group=sugroup//g' /etc/pam.d/su
|
||||||
|
|
||||||
# Setting umask to 077
|
# Setting umask to 077
|
||||||
@ -126,17 +126,12 @@ sudo snap remove firefox
|
|||||||
sudo apt install -y git-core gnome-text-editor
|
sudo apt install -y git-core gnome-text-editor
|
||||||
sudo snap install eog
|
sudo snap install eog
|
||||||
|
|
||||||
# Randomize MAC address
|
# Setup Networking
|
||||||
sudo bash -c 'cat > /etc/NetworkManager/conf.d/00-macrandomize.conf' <<-'EOF'
|
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script/main/etc/NetworkManager/conf.d/00-macrandomize.conf -o /etc/NetworkManager/conf.d/00-macrandomize.conf
|
||||||
[device]
|
sudo curl https://raw.githubusercontent.com/TommyTran732/Linux-Setup-Script/main/etc/NetworkManager/conf.d/01-transient-hostname.conf -o /etc/NetworkManager/conf.d/01-transient-hostname.conf
|
||||||
wifi.scan-rand-mac-address=yes
|
sudo nmcli general reload conf
|
||||||
[connection]
|
sudo hostnamectl hostname 'localhost'
|
||||||
wifi.cloned-mac-address=random
|
sudo hostnamectl --transient hostname ''
|
||||||
ethernet.cloned-mac-address=random
|
|
||||||
connection.stable-id=${CONNECTION}/${BOOT}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
sudo systemctl restart NetworkManager
|
|
||||||
|
|
||||||
# Enable fstrim.timer
|
# Enable fstrim.timer
|
||||||
sudo apt install tuned -y
|
sudo apt install tuned -y
|
||||||
|
6
etc/NetworkManager/conf.d/00-macrandomize.conf
Normal file
6
etc/NetworkManager/conf.d/00-macrandomize.conf
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[device]
|
||||||
|
wifi.scan-rand-mac-address=yes
|
||||||
|
[connection]
|
||||||
|
wifi.cloned-mac-address=random
|
||||||
|
ethernet.cloned-mac-address=random
|
||||||
|
connection.stable-id=${CONNECTION}/${BOOT}
|
2
etc/NetworkManager/conf.d/01-transient-hostname.conf
Normal file
2
etc/NetworkManager/conf.d/01-transient-hostname.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[main]
|
||||||
|
hostname-mode=none
|
Loading…
Reference in New Issue
Block a user