Minggu, 13 Mei 2012

Administrasaun Netwoking Uza Ubuntu

Repository local

sudo touch /etc/apt/sources.list /etc/apt/sources.list.backup
sudo gedit /etc/apt/sources.list

cara seluk instalasi Repo
apt-get install apt-cacher-ng
/etc/apt-cacher-ng/acng.conf (husik default deit)
/etc/init.d/apt-cacher-ng start ou stop
halo auto restart
sysnc-rc-conf apt-cacher-ng on

konfigurasi iha parte client
Acquire::http { Proxy "http://172.16.10.142:3124";};

Hare log real time
tail -f /var/log/apt-cacher-ng/apt-cacher.log

bele asesu report kona ba cacher iha
http://ip server:3124/acng-report.html


Instalasaun Paket
sudo dpkg
sudo apt-get install aplikasaun nia naran

Konfigurasaun TCP/IP
man interfaces
man resolv.conf

sudo gedit /etc/network/interface

auto eth0
iface eth0 inet static
address 192.168.0.8
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.1

sudo ifconfig eth0 192.168.1.1 netmask 255.255.255.0
sudo route add default gw 192.168.1.6 netmask 255.255.255.0
route -n
route del -net

Halo moris no halo mate rede
sudo ifconfig eth0 down
sudo ifconfig eth0 up

Konfigurasaun PC nia naran no Grupo
hotsname -fqd
sudo hostname naran foun

Konfigurasi Grupo nia naran
sudo gedit /etc/samba/smb.conf
WORKGROUP= naran domain ou grupo foun
sudo testparm
sudo /etc/init.d/samba restart

Instalasaun & Konfigurasaun File, Shareing ho NFS
sudo apt-get install nfs-
sudo apt-get install nfs-kernel-server

sudo gedit /etc/exports
/home/fongtil=folder atu share
192.168.1.20=ip cliente mak iha direitu atu asesu
rw=read write

etc/init.d/nfs-kernel-server restart

iha Cliente presija halo mount
sudo apt-get install portmap nfs-common
mount 192.168.1.20:/home/fongtil /home/lemi/D
esktop/nfs
192.168.1.20:/home/fongtil=address folder iha nfs server mak share
/home/lemi/Desktop/nfs= mount point ba komputer cliente nian

Sharing file uja Samba
sudo apt-get install samba
sudo gedit /etc/samba/smb.conf
atu share halo entry foun iha smb.conf linha ikus liu
[folder share]
path=/home/lemi/Music (/path/naran/directory)
writable=no
public=yes
guest ok = yes
guest only = yes
guest account =nobody
browsable = yes
 depois
/etc/init.d/samba restart

Asesu ba Folder Share
bele uja ALT+F2 selae loke janela run no hakerek smb://ip server ou hostname husi compute mak share

Halo user Samba
sudo apt-get install xinetd
sudo gedit /etc/inetd.conf
depois loke /etc/xinetd.d copy
# description: SAMBA SWAT
service swat
{
disable = no
socket_type = stream
protocol = tcp
#should use a more limited user here
user = root
wait = no
server = /usr/sbin/swat
}
depois rai file xinet.d.
restart xinetd
hakerek http://localhost:901
tau password no user name ita nia sistema Linux

Konfigurasi Network Printing
Share Print Local
gedit /etc/samba/sm.conf
edit load printing
load printer = yes

edit printer share definisaun
[printer]
comment = no
browseable = no
path = /tmp
printable = yes
public = yes
writable = no
create mode = 0700
printcap name = /etc/printcap
print command = /usr/bin/lpr -P%p -r %s
printing = cups

/etc/init.d/samba restart

Cliente Printer Networking
click iha Administration > Printing depois  browser hakerek smb://
scanning printer buka local printer> Windows Printer via SAMBA
tau password & user forward

SAMBA hanesan PDC (Primary Domain Controller
sudo apt-get install winbind
sudo gedit /etc/samba/smb.conf

[global]
workgroup = jaringanlinux
netbios = ubuntuserver
server string = %h server (Samba, Ubuntu)
passdb backend = tdbsam
security = user
username map = /etc/samba/smbusers
name resolve order = wins bcast host
domain logons = yes
preferred master = yes
wins support = yes
# Useradd scripts
add user scrip = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
add machine script = /usr/sbin/useradd -s /bin/false/ -d /var/lib/nobody %u
idmap uid = 15000-20000
idmap gid = 15000-20000

#sysnc smb password woth linux passwords
password program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\password:* %n\n
*Retype\snew\sUNIX\spassword:* %n\n
password chat debug = yes
unix password sysnc = yes
# set the loglevel
log level = 3

[homes]
comment = Home
valid users = %S
read only = no
browsable = no

[netlogo]
comment = Network Logon Service
path = /home/samba/netlogon
admin users = Administrator
valid users = %U
read only = no

[profile]
comment = User profiles
path = /home/samba/profiles
valid users = %U
create mode = 0600
directory mode = 0700
writable = yes
browsable = no

Halo Direktory samba, netlogon no profiles iha Home
se directory /var/spool/samba la presija halo mos

mkdir /home/samba
mkdir /home/samba/netlogon
mkdir /home/samba/profiles
mkdir /var/spool/samba

depois halo atribut
chmod 777 /var/spool/samba/
chmod -R root:users /home/samba/
chmod -R 771 /home/samba/

loke file /etc/nsswitch.conf
gedit /etc/nsswitch.conf
iha parte mdns_4 to linha ikus troka ho
hosts: files wins dns

gedit /etc/hosts hakerek tan host
127.0.0.1 localhost
192.168.1.1 server
192.168.1.10 windows

Agora halo password root ba SAMBA
smbpasswd -a root
New SMB password: [password foun]
Retype new SMB password: [retype password foun]

halo file /etc/samba/smbusers depois add root=administrator
echo "root = Administrator"> /etc/samba/smbusers

Tuir fali halo domain ba group Windows

net groupmap add ntgroup="Domain Admins" unixgroup=root
net groupmap add ntgroups="Domain Users" unixgroup=users
netgroupmap add ntgroup="Domain Guests" unixgroup=nogroup

Tuir fali tau user non root hodi bele asesu ba PDC
useradd naran -m -G users
New SMB password: [tau password]
Retype new SMB password:[retype password]

halo direktory mak ema hotu bele asesu ba
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx+rx-w /home/shares/allusers/

hodi folder nebe'e foin halo bele hetan asesu tenki edit fali /etc/samba/smb.conf

[allusers]
comment = All Users
path = /home/share/allusers
valid users = @users
force groups = users
create mask = 0600
directory mask =0771
writable = yes

restart SAMBA
/etc/init.d/samba restart

Halo teste se resultadu los ona
smbclient -L localhost -U%
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.3.2]
.......................

hodi windows bele asesu ba PDC tenki halo setting iha My computer> properties muda Computer Name: KompieXP & Domain: jaringanlinux e restart computer e bele asesu ba ba PDC ho password root husi samba iha windows


FIREWALL iha Linux
sudo apt-get install firestarter
depois ba iha Application>Internet>Firestarter>Forward> Start firewall
start/restart ... visto
Apply policy.... visto
Echo request (ping), MS Traceroute, Address Masking Visto
Workstation Visto, Throughput visto
Drop silenty visto, Block broadcast from external network visto

Instala Antvirus iha /usr/src
dpkg -i avast4workstation_1.3.0-2.i386.deb
dpkg -i avg... .deb
halo registrasi
/opt/grisoft/avggui/bin/avggui_update_licinfo.sh

Halo DNS SERVER
sudo apt-get install bind9
gedit /etc/bind/named.conf

zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/ip.db";
};

zone "serverubuntu.co.id" {
file "/etc/bind/www.db";
};

gedit /etc/bind/ip.db no hatama kode tuir mai ne'e
$TTL 86400
@ IN SOA ns.serverubuntu.co.id. root.serverubuntu.co.id. (
2006081201
8H
2H
1W
1D)

@ IN NS ns.serverubuntu.co.id.
@ IN MX 10 ns.serverubuntu.co.id.

1 IN PTR ns.serverubuntu.co.id.
1 IN PTR www.serverubuntu.co.id.
1 IN PTR mail.serverubuntu.co.id.

Tuir fali gedit /etc/bind/www.db
hatma kode sira tuir mai ne'e
$TTL 86400
@ IN SOA ns.serverubuntu.co.id. root.serverubuntu.co.id (
2006081201
8H
2H
1W
1D )

@ IN MS ns.serverubuntu.co.id.
@ IN MX 10 ns.serverubuntu.co.id.

ns   IN A 192.168.1.1
www  IN A 192.168.1.1
mail IN A 192.168.1.1

hodi komputer be load dns server presija edit iha resolve.conf
gedit /etc/resolve.conf
search serverubuntu.co.id
nameserver 192.168.1.1

restart bind
/etc/init.d/bind9 restart

Bele koko ping ba www.serverubuntu.co.id
ping www.serverubuntu.co.id
dig www.serverubuntu.co.id

depois bele koko halo nslookup:
nslookup -sil

bele cek host serverubuntu.co.id
host serverubuntu.co.id

Tidak ada komentar:

Posting Komentar