Posts Tagged ‘aptitude’

Always forget:

How to configure Network Bridge on Ubuntu Server

 

1. Configure DHCP on brO

######################

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

######################

 

2. Configure Static IP on brO

######################

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp

auto br0
iface br0 inet static
address 192.168.1.200
broadcast 192.168.1.255
netmask 255.255.255.0
gateway 192.168.1.254
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

######################

Date in ubuntu

Posted: October 28, 2011 in Debian
Tags: , , , , , , , , ,

Selalu lupa….

1. Install ntp

root@webmail:~# aptitude install ntp

2. Get date from mst.sirim.my

ntpdate mst.sirim.my

3. Set script

root@webmail:~# pico /skrip/takwin

################ cut here ##################

#!/bin/bash
ntpdate mst.sirim.my

################ cut here ##################

4. Set Cron

root@webmail:~# crontab -u root -e

*/50 * * * * /skrip/takwin >/dev/null 2>&1

5. Run takwin

root@webmail:~# /skrip/takwin

28 Oct 19:52:27 ntpdate[1162]: step time server 202.190.26.30 offset 4.735816 sec