JBu92

Interface bridging

8 posts in this topic

Anyone know how to easily bridge 2 interfaces under linux? say... eth0 to wlan0...

I know it's easy to do under windows, just involving a simple rightclick...

specifically BT4r1. I basically want to run my laptop like an AP and monitor the traffic that comes through. Perhaps even making a subinterface which would allow me to connect to the existing wifi, yet offer myself up as an AP?

0

Share this post


Link to post
Share on other sites

Although I suppose since I could bridge the interfaces from within windows there's no real need to do it under BT4... so if not "how do I bridge interfaces under BT?", "how do I spoof my mac under windows?"

0

Share this post


Link to post
Share on other sites

madmacs should word good enough for changing mac on windows. ive never had it working to bridge interface in linux, try searching "ip masquerade"/"ip masquerading"

0

Share this post


Link to post
Share on other sites

Anyone know how to easily bridge 2 interfaces under linux? say... eth0 to wlan0...

I know it's easy to do under windows, just involving a simple rightclick...

specifically BT4r1. I basically want to run my laptop like an AP and monitor the traffic that comes through. Perhaps even making a subinterface which would allow me to connect to the existing wifi, yet offer myself up as an AP?

I've only ever bridged interfaces with OpenWRT so I can't really give you a howto. but you could try installing bridge-utils and reading the man file.

apt-get install bridge-utils

man bridge-utils-interfaces

Bridging interfaces is like plugging them both into a switch, so you would effectively be extending the wired LAN over your wireless card. I suppose it would work, but if I were attempting this I would double NAT the "users". It would be more work, but then if your wired interface was connected to a network that you didn't control the admins would be less likely to notice the influx of wireless users. I think there are a few projects designed to do stuff like this though, so they probably have better ideas on how to go about it.

0

Share this post


Link to post
Share on other sites

As suggested above, brctl is in the bridge-utils package. I'm going to make a bridge interface called br0

brctl addbr br0

I will now add each interface to the bridge.

brctl addif br0 eth0

brctl addif br0 wlan0

If I were to use

tcpdump -i br0

I would see traffic from both eth0 and wlan0.

0

Share this post


Link to post
Share on other sites

As suggested above, brctl is in the bridge-utils package. I'm going to make a bridge interface called br0

brctl addbr br0

I will now add each interface to the bridge.

brctl addif br0 eth0

brctl addif br0 wlan0

If I were to use

tcpdump -i br0

I would see traffic from both eth0 and wlan0.

nice, that's what I'm looking for. but since I'm running off a kde-based livecd, how would I go about installing that? (or do you know if it's built in to BT4r1?)

0

Share this post


Link to post
Share on other sites

As suggested above, brctl is in the bridge-utils package. I'm going to make a bridge interface called br0

brctl addbr br0

I will now add each interface to the bridge.

brctl addif br0 eth0

brctl addif br0 wlan0

If I were to use

tcpdump -i br0

I would see traffic from both eth0 and wlan0.

nice, that's what I'm looking for. but since I'm running off a kde-based livecd, how would I go about installing that? (or do you know if it's built in to BT4r1?)

Hi,

I was looking for this kind of information from some days now.

I am using Backtrack4 R1. I am using RasPPP dialer(ppp0 interface) using userid/password to connect to the ISP--->Internet. I want to capture ARP packet on ppp0 interface with wireshark but wireshark do not capture all except ARP protocol.

I am using single mode, somehow Masquerading do not work on my BackTrack4 R1 in RasPPP dialer.

I have tried to add ppp0 to br0 as suggested in your post but it says it does not exist.

Below is some basic information:-



Ifconfig -a
-----------------


eth0 Link encap:Ethernet HWaddr 00:e0:b0:eb:35:62
inet6 addr: fe80::2e0:b0ff:feeb:3562/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2186085 errors:0 dropped:0 overruns:0 frame:0
TX packets:1656698 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2960809786 (2.9 GB) TX bytes:158087415 (158.0 MB)
Interrupt:17 Base address:0xcc00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:97269 errors:0 dropped:0 overruns:0 frame:0
TX packets:97269 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:74294433 (74.2 MB) TX bytes:74294433 (74.2 MB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:122.XXX.XXX.XXX P-t-P:XXX.XXX.XXX.XXX Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:1464 errors:0 dropped:0 overruns:0 frame:0
TX packets:1325 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:1567200 (1.5 MB) TX bytes:308648 (308.6 KB)




route -n
-----------
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
xxx.xxxx.xxxx.xxxx 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0


Please somebody help me out on this.

Thanks.

0

Share this post


Link to post
Share on other sites

wireshark should capture arp. did you try ifconfig ppp0 promisc?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now