Friday, August 29, 2008
Create sub-interfaces in Linux
linux #ifconfig eth0:1
linux # ifconfig eth0:2
This creates two subinterfaces to the eth0 device.
To make the change peramanent you have to include the settings in /etc/rc.local file in your linux machine. Otherwise these changes are lost when the system is restarted.
In RedHat/Fedora machines you can copy /etc/network-scripts/network/ifcfg-eth0 to /etc/network-scripts/network/ifcfg-eth0:1 and /etc/network-scripts/network/ifcfg-eth0:2 .
This makes changes permanent in RedHat/Fedora. In the debian machines the file to change is /etc/network/interfaces.
Monday, August 11, 2008
Zenmap - nmap frontend for Linux
Tuesday, August 05, 2008
Setup network bridge in Debian and RedHat Linux
We can setup a network bridge in Debian and Redhat systems using the following methods
In RedHat Linux do the following
First install bridge-utils using yum or rpm or utility you like
Remove the ip address of the ethernet interfaces. You need a minimum of two
Then issue the following commands
#> brctl addbr br0
#> brctl addif br0 eth0
#> brctl addif br0 eth1
#> ip link set br0 up
And the bridge is ready.
To set ip address to bridge you can use
#> ip addr add 10.1.1.18/16 brd + dev br0
To configure routing on that bridge use the following command. This sets default gateway
#> route add default gw 10.1.1.1 dev br0.
In Debian use the following commands
To install bridge-utils
aptitude install bridge-utils
Then issue following commands
auto br0
iface br0 inet static
bridge_ports eth0
address 192.168.10.10
netmask 255.255.255.0
network 192.168.10.0
broadcast 192.168.10.255
gateway 192.168.10.1
To make the change permanent you have to enter these commands (except the installing command) in rc.local file in the /etc directory (Redhat ) /etc/network/interfaces ( for Debian based systems).
The brctl comes with various options inlcuding stp and others. Read manpage for details.
Use
>#man brctl