LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-20-2010, 01:32 PM   #1
taoelism
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Rep: Reputation: 0
Creating a bridge between ad-hoc and wireless inteface


I was wondering if I could create a bridge between two wireless interfaces. So that when there is a WAN that filters MAC's, 2 different computers which aren't in the WAN whitelist can connect to the WAN via me.
Is that possible? And how?
Thanks!

Last edited by taoelism; 10-21-2010 at 04:02 AM.
 
Old 10-20-2010, 04:27 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
I'm curious: what size subnets are you talking about bridging? Are both wireless interfaces in your Linux box? (Are you using a Linux box? Which distro / version?)

And if I may be so bold: why in the world would you not just route between the two subnets, and manage access control at the IP level?
 
Old 10-21-2010, 12:15 AM   #3
taoelism
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Anomie: I'm using Arch linux, with kernel 2.6.35-ARCH. I don't really know what a subnet is, but, if it's a client, about 10 clients should be able to connect.

Quote:
And if I may be so bold: why in the world would you not just route between the two subnets, and manage access control at the IP level?
.
I don't know alot about servers. Could you please explain that? I don't really understand that one...

[EDIT]
Ad-hoc is a possibility. I've tried it, and my cellphone sees it just like a normal WAN.
To create an ad-hoc network, with bridge to eth0, I used this:
Quote:
#!/bin/sh
if [[ $1 == 'start' ]]; then
ip link set down dev wlan0
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel 3
iwconfig wlan0 essid adhoc-net key sass
ip link set up dev wlan0
ip addr add 192.168.0.50/24 dev wlan0
/etc/rc.d/dnsmasq start
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
elif [[ $1 == 'stop' ]]; then
iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
/etc/rc.d/dnsmasq stop
ip addr del 192.168.0.50/24 dev wlan0
ip link set down dev wlan0
iwconfig wlan0 essid off
iwconfig wlan0 mode managed
fi
Now, to bridge wlan0(ad-hoc) to wlan1, instead of to eth0, can I just change "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" to "iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE"?

Thanks!

Credits for the script go to kazuo and hexanol from archlinux.org forums.

Last edited by taoelism; 10-21-2010 at 04:06 AM.
 
Old 10-21-2010, 02:26 PM   #4
taoelism
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
"iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE" yields an "Operation not supported" error, both when the interface is up and when it's down.
 
Old 10-23-2010, 02:00 AM   #5
taoelism
LQ Newbie
 
Registered: Oct 2010
Posts: 4

Original Poster
Rep: Reputation: 0
*Bump*
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Creating the bridge between SketchUp and Eclipse LXer Syndicated Linux News 0 04-15-2009 03:30 PM
Creating a bridge from ADSL router to WLAN router linuxlainen Linux - Networking 7 02-12-2009 11:20 AM
Trouble creating network bridge amhso Linux - Networking 6 01-20-2007 08:46 PM
creating a cron(tab) scheduled thing student04 Linux - Software 5 12-26-2004 09:18 PM
Having problems creating a network bridge. Royle Linux - Networking 1 08-16-2004 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration