My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
Thanks
Doug P
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
Thanks
Doug P
Doug, Assuming your wireless device can be placed in promiscuous mode and have it's source address spoofed then you should be able to use the "bridge" module. The "bridge" module should be in FC4 by default, check out the manpages for brctl and http://linux-net.osdl.org/index.php/Bridge
C.
- -- Craig McLean http://fukka.co.uk craig@fukka.co.uk Where the fun never starts Powered by FreeBSD, and GIN!
Craig McLean wrote:
Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
Thanks
Doug P
Doug, Assuming your wireless device can be placed in promiscuous mode and have it's source address spoofed then you should be able to use the "bridge" module. The "bridge" module should be in FC4 by default, check out the manpages for brctl and http://linux-net.osdl.org/index.php/Bridge
You may also want to read the HOWTO in the bridge-util documentation. It explains how to set up the bridge. You have to bring up eth0 and eth1 slightly different, and then bring up the bridge. The bridge gets the IP address, not the individual interfaces.
Mikkel
On Sun, 2006-02-05 at 11:25, Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
Les Mikesell wrote:
On Sun, 2006-02-05 at 11:25, Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
The magic part I don't know how to do is "route and NAT". Can you point me to an example on how to route and NAT between interfaces? Is this a IPTables thing?
Thanks
Doug P
On Sun, 2006-02-05 at 13:58, Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
The magic part I don't know how to do is "route and NAT". Can you point me to an example on how to route and NAT between interfaces? Is this a IPTables thing?
You just need to: modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward
And make sure any other firewalling lets what you need through. You should get a default route via dhcp on the wireless side and one will be added by the netmask for your private wired side so you don't need to add any extra routes.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 5 Feb 2006 at 14:19, Les Mikesell wrote:
From: Les Mikesell lesmikesell@gmail.com To: For users of Fedora Core releases fedora-list@redhat.com Date sent: Sun, 05 Feb 2006 14:19:53 -0600 Subject: Re: Bridging wifi to ethernet Send reply to: For users of Fedora Core releases fedora-list@redhat.com mailto:fedora-list-request@redhat.com?subject=unsubscribe mailto:fedora-list-request@redhat.com?subject=subscribe
On Sun, 2006-02-05 at 13:58, Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
The magic part I don't know how to do is "route and NAT". Can you point me to an example on how to route and NAT between interfaces? Is this a IPTables thing?
You just need to: modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward
And make sure any other firewalling lets what you need through. You should get a default route via dhcp on the wireless side and one will be added by the netmask for your private wired side so you don't need to add any extra routes.
You might also want to look at running a squid proxy server on the machine, and have the clients use it. That way if you are going to the same sites, you won't be downloading multiply copies of all the materials.
-- Les Mikesell lesmikesell@gmail.com
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
+----------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mikes@kuentos.guam.net mailto:msetzerii@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins +----------------------------------------------------------+
http://setiathome.berkeley.edu Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489)
BOINC Seti@Home Total Credits 377412.601520
Les Mikesell wrote:
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
The magic part I don't know how to do is "route and NAT". Can you point me to an example on how to route and NAT between interfaces? Is this a IPTables thing?
You just need to: modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward
And make sure any other firewalling lets what you need through. You should get a default route via dhcp on the wireless side and one will be added by the netmask for your private wired side so you don't need to add any extra routes.
My wifi interface is eth1 and will pull an address from the library, wired is eth0. Do I give my eth0 interface a 192.168.0.x address?
Thanks
Doug P
On Sun, 2006-02-05 at 15:28, Douglas Phillipson wrote:
Les Mikesell wrote:
A simpler approach that is also more likely to work would be to set up a different private address range on the wired side and a dhcp server for it, then route and NAT to the wireless interface. The only tricky part is that you either have to run your own caching dns server and point the dhcp clients to it, or you'll have to pick up the DNS server you receive from the wireless DHCP and edit your dhcpd.conf to pass that on to the clients.
The magic part I don't know how to do is "route and NAT". Can you point me to an example on how to route and NAT between interfaces? Is this a IPTables thing?
You just need to: modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward
And make sure any other firewalling lets what you need through. You should get a default route via dhcp on the wireless side and one will be added by the netmask for your private wired side so you don't need to add any extra routes.
My wifi interface is eth1 and will pull an address from the library, wired is eth0. Do I give my eth0 interface a 192.168.0.x address?
It can be anything except in the range you get on the 'outside' interface. 192.168.0.x is pretty common so you might have a problem if the library uses private addresses too. Something like 192.168.232.1 for your eth0 might be less likely to collide. You can use a netmask of 255.255.255.0 and give out the range of 192.168.232.2 - 192.168.232.254 via dhcp. Your 'inside' address should be the default router for the dhcp clients, and if you are running a DNS server it can be their dns also.
Les Mikesell wrote:
On Sun, 2006-02-05 at 13:58, Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
You just need to: modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward
And make sure any other firewalling lets what you need through. You should get a default route via dhcp on the wireless side and one will be added by the netmask for your private wired side so you don't need to add any extra routes.
I got it working! Thanks for the idea of NAT.
Here is how it works:
eth0 = LAN interface eth1 = WIFI interface
Ran: iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE iptables --append FORWARD --in-interface eth0 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward
Then I brought up LAN interface eth0 on 192.168.10.1
Used webmin to start a dhcp server listening on eth0 with a scope of 192.168.10.50 to 192.168.10.80, A default router of 192.168.10.1 DNS server of 24.234.0.5 (COX). Then brought up a second PC hooked to a switch on the same net as eth0 of my laptop using dhcp and it pulled an address (192.168.10.50) from the dhcp server and it seems to work fine routing over the wifi interface.
So my WIFI eth1 pulls an address from my Linksys firewall, all the LAN machines pull an address from the dhcp server on the laptop.
Seems to work good. I need to document this in the even that I'm not at a meeting (likely if we continue at the Library).
There was one little glitch I ran into with PC's on the LAN. If they had previously had a static address there is some residual stuff that needs to get deleted, the default router and DNS addressed in the file:
/etc/sysconfig/networking/devices/ifcfg-eth0
When you switch to DHCP and request an address, if there is already a statically assigned default gateway, the new one from dhcp doesn't get set properly. It's easy to fix but you just have to know what's wrong when the gateway doesn't get set properly.
Regards
Doug P
On Sun, 2006-02-05 at 23:34, Douglas Phillipson wrote:
So my WIFI eth1 pulls an address from my Linksys firewall, all the LAN machines pull an address from the dhcp server on the laptop.
Seems to work good. I need to document this in the even that I'm not at a meeting (likely if we continue at the Library).
I'll plug the k12ltsp distribution again: http://www.k12ltsp.org/phpwiki/ It includes a re-spun fedora distribution with some additions that not only include an init script for NAT but also allows network booting of other machines as thin clients. It would have only needed the command 'service nat start' if you weren't running it already. And, you could give out a boot floppy that would let someone without Linux installed come up as an Xterminal logging into your server (not sure how many a laptop could handle, though).
Douglas Phillipson wrote:
My LUG recently had to move to a Library with WIFI access only. Running FC4 on my HP Pavilion laptop, how specifically, can I bridge my WIFI interface (eth1) over to my eth0 interface so I can hook in all the wired ethernet users to get access to the WIFI networks DHCP server? I don't have to recompile a Kernel I hope... I can still use my laptop normally while I'm bridging for everyone else I hope?
[summer@bilby ~]$ man -k bridge QAxScriptManager [qaxscriptmanager] (3qt) - Bridge between application objectsand script code brctl (8) - ethernet bridge administration [summer@bilby ~]$