brctl command not found in Kali-Linux 2

2

I wanted to use bridge controller in Kali-Linux 2, which would work out of the box in Backtrack and Kali-Linux 1.0. However, I am not able to find a solution for installing it on Kali-Linux 2.0

Y M

Posted 2015-09-06T08:35:14.380

Reputation: 139

Perhaps it has bridge from iproute2 instead? – user1686 – 2015-09-06T16:05:05.157

Answers

1

Since, the bridge utils package is not available by default,

apt-get install bridge-utils

won't work.

So start by adding to /etc/apt/sources.list

deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib

and then run:

apt-get update
apt-get install bridge-utils

Y M

Posted 2015-09-06T08:35:14.380

Reputation: 139

Are they not the standard kali 2 repos? If not, don't add them, especially if they are kali 1 repos as you will cause conflictals all over the place. Besides bridge-utils is in the standard repos already I think. – TheJulyPlot – 2015-09-06T09:40:31.763

1apt-get install bridge-utils works in kali 2 at time of writing this. No need to change any sources. – Totem – 2016-01-14T13:47:53.593

4

I'm Actually with MariusMatutiae moving away from ifconfig is the right way to go. The simple reason is that all the Linux distros are moving away from it. the more complex one can be found at ifconfig sucks.

Now let's simplify the creation of a bridge using the iproute2 Utility Suite:

ip link add name bridge_name type bridge
ip link set bridge_name up

Now to add devices you simply use:

ip link set int_name master bridge_name

The obvious example is:

ip link add name br0 type bridge
ip link set br0 up
ip link set eth0 master br0
ip link set eth1 master br0

It's the same amount of effort as in the bridge utils and might even be easier to remembering for some people, but that's just my opinion.

Vartan Avny

Posted 2015-09-06T08:35:14.380

Reputation: 41

3

You should not use bridge-utils any longer: the iproute2 will build a bridge for you, and it is installed by default.

Suppose you want to bridge eth0 and a tap0 interface, the following commands are needed:

ip tuntap add tap0 mode tap user root
ip link set tap0 up
ip link add br0 type bridge
ip link set tap0 master br0
ip link set dev eth0 down
ip addr flush dev eth0
ip link set dev eth0 up
ip lik set dev eth0 master br0
ip link set br0 up

This is a full series of commands, which creates the interface tap0, clears eth0 from previous addresses (you never know...), enslaves both of them to br0, and lastly brings up br0, ready for

dhcp -v br0

If instead you want to give a static IP address to br0, before bringing it up, just use:

ip addr add 192.168.1.63/24 dev br0

and then you can bring it up. It can easily be scripted, and inserted into /etc/network/interfaces, just in case.

MariusMatutiae

Posted 2015-09-06T08:35:14.380

Reputation: 41 321

This seems more complicated. What is the reason that we should not use bridge-utils? – Totem – 2016-01-14T13:45:55.767

@Totem The brctl utility has been superseded by ip, which does everything, including creating tun/tap interfaces which could not be created by the bridge-utils utility. brctrl is still maintained but only to allow old production systems to continue working. As noticed by mango below, new Linux systems have ip by default, not brctrl. – MariusMatutiae – 2016-01-14T15:08:10.823

1

Use the following command to install them, they are not part of the standard install. Not strictly infosec, but you could be creating a virtual network for pen-testing.

apt-get install bridge-utils

TheJulyPlot

Posted 2015-09-06T08:35:14.380

Reputation: 121

2Thanks man! The above command was not working because it's source was not available in Kali 2.0 – Y M – 2015-09-06T09:39:32.197

0

bridge-utils is still available in Kali Linux 2.0, but you have to add this to /var/apt/sources.list

deb http://security.kali.org/kali-security/ sana/updates main contrib non-free
deb-src http://security.kali.org/kali-security/ sana/updates main contrib non-free

After that run:

sudo apt-get update  ## update the list of available packages
sudo apt-get install bridge-utils

root420

Posted 2015-09-06T08:35:14.380

Reputation: 1