LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 07-28-2015, 04:46 AM   #1
hakalulu
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
Question HowTo host W-LAN AP on dual-lan-server? --- Debian and hostapd


Hello,

I bought a server with two gigabit-ethernet-ports and a Wlan-N-Card. I would like to bridge a WLAN AP with one of the Ethernet ports.
hostapd seems to be useful for this, but I could not find a tutorial on how to setup it with a dual-LAN-system.
I guess I have to setup the AP with hostapd and then create the networking rules, but I do not know where and how the latter needs to be done.
Thanks in advance

Info:
Debian - (how to get version info?)
2x Intel Gig-LAN (onboard)
Broadcom WLAN N (minipci-e)

The server has not even arrived yet but it should be here tomorrow or the day after. That's why I do not have more detailed info on the hardware, sorry.

Edit:
Wondered if that was enough info, so here my beautiful drawing
http://www.directupload.net/file/d/4...9qswvv_png.htm

Last edited by hakalulu; 07-28-2015 at 05:07 AM.
 
Old 07-29-2015, 07:22 PM   #2
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
You would set up the wireless access point first using hostapd. Then you would use the bridge-utils packages, specifically the brctl command to bridge the interfaces.

You can also set up the bridged NIC using network manager from the command line, since I know that network manager comes installed on most Debian systems.

Tutorial to set up WiFi AP: http://www.cyberciti.biz/faq/debian-...-access-point/

Tutorial to set up bridged NICs in Debian: https://wiki.debian.org/BridgeNetworkConnections

I am not in the habit of simply telling people exactly what commands to type in to the terminal. Please read the documentation and post back here with any help you need or questions you have to ask.
 
Old 07-30-2015, 06:27 AM   #3
hakalulu
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thumbs up

Thank you, that helped.

I am really content with how it works right now. Test was also successful: pulling out one eth-cable and see if server is down and WAP still up, then the other and check if WAP down and server still up. Thanks again. I will now revert configurations I made following the tutorial to see what they do.

EDIT:
Okay, there is one thing that bugs me. Is it possible to route a packet out of the bridge? As it is now, a packet from the wlan-interface addressed to the servers first ethernet port will exit the second ethernet port and enter the first one by being routet by the switch.

EDIT2: here are some of my current configs:
/etc/network/interfaces
Quote:
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface LAN1
auto p4p1
iface p4p1 inet dhcp

# Network-bridge
auto br0
iface br0 inet manual
bridge_ports p1p1 wlan0
/etc/hostapd/hostapd.conf:
Quote:
interface=wlan0
bridge=br0
driver=nl80211
country_code=DE
ssid=Linus
hw_mode=g
channel=10
auth_algs=1
wpa=2
wpa_passphrase=hoverboard
wpa_key_mgmt=WPA-PSK WPA-EAP WPA-PSK-SHA256 WPA-EAP-SHA256
wpa_pairwise=CCMP
rsn_pairwise=CCMP
hostapd is started at boottime

Last edited by hakalulu; 07-30-2015 at 11:33 AM.
 
Old 07-30-2015, 12:58 PM   #4
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
I believe you need to use the POSTROUTING switch in IPTables to route the traffic on the WAP to the correct place.
 
  


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
How can I make a virtual LAN with KVM on debian wheezy host? johndoe777 Linux - Networking 0 08-21-2014 05:44 AM
Incoming email server on a LAN - howto babysnake Linux - Server 6 02-26-2007 01:22 PM
howto setup vpn server within the lan gv_rajasekhar Linux - Networking 1 08-31-2006 01:35 AM
access lan web server thru dual homed host / webserver from internet with one pub IP. swilhelm Linux - Networking 2 08-02-2006 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:43 AM.

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