You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
615 B

#!/bin/bash
#
OLD_NAME=vague-client
HNAME=client1
sed -i "s/$OLD_NAME/$HNAME/g" /etc/hostname
sed -i "s/$OLD_NAME/$HNAME/g" /etc/hosts
hostname $HNAME
sed -i "s/#VAGRANT-END/up route add -net 172.16.0.0\/16 gw 172.16.4.254 dev enp0s8\nup route add -net 192.168.0.0\/16 gw 172.16.4.254 dev enp0s8/g" /etc/network/interfaces
#/etc/init.d/networking restart
echo "net.ipv4.conf.all.rp_filter=0" >> /etc/sysctl.conf
echo "net.ipv4.conf.default.rp_filter=0" >> /etc/sysctl.conf
echo "net.ipv4.conf.lo.rp_filter=0" >> /etc/sysctl.conf
echo "net.ipv4.conf.enp0s8.rp_filter=0" >> /etc/sysctl.conf
sysctl -p
exit