Click Add

Tuesday, July 21, 2009

UBUNTU net+dns+packet forwarding enable

Root

To make the installation easier create a root user. Many files can only be changed with root user.

Login user, then enter command

#sudo passwd root
Enter new UNIX password:
Retype new UNIX password:
#su root
Password:

SSH

So we can cut and paste commands to make life easier

sudo apt-get install openssh-serverInstall putty on you windows machine

Repository

Enable all repositorys

nano -w /etc/apt/sources.list

Update Ubuntu

sudo apt-get update

sudo apt-get upgrade

Network setup

Setup up your network hardware/software

Domain Name Service (DNS)

Install

sudo apt-get install bind

Start

sudo /etc/init.d/bind start

Interfaces

nano -w /etc/network/interfaces

auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto eth1

To enable packet forwarding you should add the following line

nano -w /etc/sysctl.conf

net/ipv4/ip_forward=1

Enable and check ip forward without a reboot

echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward

Restart network

sudo /etc/init.d/networking restart

No comments:

Post a Comment