Tuesday, April 28, 2009

Boot into Single-User Mode

There may have lots of source how to boot to single mode when Google. But my bad, my memory not good enough.. SO have to make a post to remind myself in future.

Boot in single mode in linux is almost equally with boot into safe mode in Windows. This step will be useful if using the GRUB boot loader. Single mode is useful when forget the root password or the server access.

1. When boot into linux, Press Enter when see the screen as below.


Press Enter when see this screen

2. Then choose which kernel version did you wish to boot as shown below. Press e to edit the kernel parameter.

Press e after choose the kernel version

3. When you see the screen as attachment, select the selection start with words kernel. Then press e to edit the line.

Press e to start edit the kernel parameter

4. Then go to the end of the line, and add the words single. This will indicate the kernel to boot into single mode. Once done, press Enter.

Type single at the end of the line

5. Now, press b to start boot with the new kernel parameter.

Press b to boot into single mode

That all.. you will be in single mode once the boot complete.

Monday, April 27, 2009

Network Address Translation

As I promised Poh Meng in a very boring Sunday, I will post this basic cisco commands for NAT as co-author for this blog, I appreciate Poh Meng for given me the chance to share my semi professional knowledge here, and hope you all find it useful for you.

Normally these IPs are given by ISP, and all these IP are:
WAN IP: 207.123.123.122 (Customer), 207.123.123.121 (ISP) <--- you have 207.123.123.120/30 here, normally first usable IP of this subnet - 207.123.123.121 is reside to ISP end, and second usable IP of this subnet will allocated to CPE
LAN IP: 62.14.139.132/29 <--- these IPs are given to customer by ISP as Internet IP address (registered IP)

OK, now we start the Cisco router part:
First we start with assign IP to each interface, both LAN and WAN.
=====Cisco Command=====
interface e0 or interface f0/0 (LAN interface)
ip address 192.168.0.1 255.255.255.0 <--- assign IP to interface
ip nat inside <--- define boundary of NAT
no shut

interface s0 (WAN interface)
ip address 207.123.123.122 255.255.255.252 <--- assign IP to interface
ip nat outside <--- define boundary of NAT
no shut

*Sorry for I may confuse you if you don't even know what is IP subnet or subnet mask, 255.255.255.252 behind IP address just a subnet mask for /30 subnet

ip route 0.0.0.0 0.0.0.0 207.123.123.121 <--- this is command for default route
access-list 10 permit 192.168.0.0 0.0.0.255 <---ACL to allow translation from LAN IP to WAN IP
ip nat pool WANIP 62.14.139.133 62.14.139.133 netmask 255.255.255.248 <--- IP nat pool, Start IP and End IP
ip nat inside source list 10 pool WANIP overload <--- to apply internal IP translation, overload to allow multiple LAN IPs translate to single WAN IP

DONE