Statikus ip cím beállítás

#!/bin/bash
echo "
auto lo
iface lo inet loopback
auto wlxc04a002a7319
iface wlxc04a002a7319 inet static
address 192.168.0.200
netmask 255.255.255.0
gateway 192.168.0.254
wpa-ssid SSID
wpa-psk password
dns-nameservers 192.168.0.254">/etc/network/interfaces

DHCP beállítás

#!/bin/bash
apt-get update
apt-get install isc-dhcp-server -y
echo "
authoritative;
ddns-update-style none;
option domain-name-servers 192.168.0.254;
option broadcast-address 192.168.0.255;
option routers 192.168.0.254;
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.0.0 netmask 255.255.255.0{
range 192.168.0.10 192.168.0.100;}">/etc/dhcp/dhcpd.conf
service isc-dhcp-server restart

DNS

Samba

#!/bin/bash
apt-get update
apt-get install samba -y
mkdir /srv/kozos
mkdir /srv/owner
chmod 777 /srv/owner
chmod 700 /srv/owner
chown owner:owner /srv/owner
echo "

[global]
netbios name=ubuntu-server
security=user
map to guest=bad user
workgroup = WORKGROUP
wins support=yes
public=yes

[kozos]
comment=nyilvános írható-olvasható megosztás
path=/srv/kozos
writeable=yes
read only=no
browseable=yes
guest=ok
public=yes

[owner]
comment=írható-olvasható megosztás, a owner felhasználónak
path=/srv/owner
writeable=yes
browseable=yes
public=yes
read list=owner
writelist=owner
force directory mode=0777
force create mode=0777">/etc/samba/smb.conf
service smbd restart

WEB szerver

#!/bin/bash
sudo dpkg --configure -a
apt-get update
apt-get install apache2 –y
/etc/init.d/apache2 restart
chmod 777 -R /var/www/