LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-01-2004, 06:14 PM   #1
ulto
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Rep: Reputation: 0
do i have to bridge a wireless and wired connection on the same linux box


first of sorry if posted before or if it should be in wireless
im on a red hat 9 box and im after installing a netgear ma311 wireless card to act as an access point with the driver hostap
all is well (i think anyway so far)

i have a wired connection on my LAN on the eth0 interface and i want wireless clients to be able to connect to the internet via a dhcp server(from the wlan0 interface)

the big question is do i need to bridge the two connections(both are on the same box remember!) or can i just forward the traffic to the wired conection using iptables or NAT(ill have use NAT anyway cause ill be using private addresses 192.168.0.0)

the wired connection will be 157.190.x.x(public address) will i need to forward to the public gateway ot just the ipaddress of my ethernet card and the rest takes care of it self

also how can i check to i have dhcp installed on the linux box i thought it came on it via default but i cant seem to find dhcpd at all

i know i have to rebuild the kernel if i need to bridge so im trying to avoid this if possible as i screwed it up last time and almost lost everything

cheers in advance!
 
Old 04-05-2004, 05:38 PM   #2
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
I don't think briding will work for this application. If you used bridging you would be sending packets with a source address of 192.168.x.x out to the internet and you would never get a reply.

I think you need to enable packet forwarding and configure iptables to NAT the traffic.
 
Old 04-07-2004, 12:37 PM   #3
ulto
LQ Newbie
 
Registered: Apr 2004
Posts: 18

Original Poster
Rep: Reputation: 0
ok would something like this work

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE


iptables --append FORWARD --in-interface wlan0 -j ACCEPT



________________________________________
echo 1 > /proc/sys/net/ipv4/ip_forward

- Enables packet forwarding by kernel

route add -net 192.168.1.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev wlan0

Where XXX.XXX.XXX.XXX is the internet gateway defined by my LAN(not sure if this is my computer or the gateway of my computer!?)

so what do ye think am i missing anything at all!?

surely there is more or does that look right
ill be testing it 2morrow but wondering am i going about it the right way and if it works ill post up the config i used for it to be of benfit for others!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Howto bridge wireless and wired network interfaces? pohl886 Debian 11 07-19-2011 06:58 PM
Wireless vs wired connection on same laptop rps63ifid Fedora 7 02-02-2005 09:38 PM
Wireless Laptop to Wired ethernet via Linux PC (wired/wireless) sambartle Linux - Wireless Networking 0 01-30-2005 04:37 AM
Wireless - Wired bridge while still being usable? Other network questions too.... etherag Linux - Wireless Networking 6 08-27-2004 09:37 AM
Wired/Wireless Bridge MMHein Linux - Wireless Networking 2 10-07-2003 01:44 AM


All times are GMT -5. The time now is 11:25 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration