顯示具有 network 標籤的文章。 顯示所有文章
顯示具有 network 標籤的文章。 顯示所有文章

2017年10月24日 星期二

Ubuntu 16.04 LTS Template 要調整的東西

1. 打開  ipv4 DHCP

sudo nano /etc/network/interfaces

auto enp0s25
iface enp0s25 inet dhcp


要改成固定IP的話

auto enp0s25
iface enp0s25 inet static
address 192.168.0.16
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.4.4 8.8.8.8


2. disable ivp6 

/etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

allow root login

  1. sudo nano /etc/ssh/sshd_config
    1. change
      PermitRootLogin prohibit-password
    to
    PermitRootLogin yes 
    
    or sudo sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config
    1. in order to PAM authentication add
      AllowUsers root
    or sudo echo "AllowUsers root" >> /etc/ssh/sshd_config
    1. sudo service ssh restart
works fine
in order you don't know your root password set new with privileged user
sudo passwd root





2015年10月1日 星期四

CentOS 6 udev 改 NIC 名稱

see http://www.ichiayi.com/wiki/tech/udev

/etc/udev/rules.d/70-presistent-net.rules
會記錄 MAC ADDRESS 與 eth* 的對應

在 VM Template 可以
移掉 
 /etc/sysconfig/network-scripts/ifcfg-eth0 內的 UUID 以及 HWADDR
刪除 /etc/udev/rules.d/70-persistent-net.rules 這個檔案


臨時使用

ifconfig eth0 192.168.1.x netmask 255.255.255.0
ifconfig eth0 up
route add default gw 192.168.1.254