You are not logged in.
You know how in Windows, if you're short of a router, you can enable routing through a couple ports by "bridging" them together? How do you do this in linux?
Last edited by synthead (2008-04-14 08:17:12)
Offline
with brctl
e.g.:
brctl addbr mybridge
brctl addif mybridge eth0
brctl addif mybridge eth1
(you may also need to do this:
ifconfig eth0 0.0.0.0 promisc up
and the same for eth1)
then configure the bridge as you would configure a normal interface
ifconfig mybridge $ip netmask $netmask broadcast $broadcast
Last edited by samlt (2007-12-12 08:26:53)
Offline
Nice, seems very easy. Which package in the repos has brctl?
Offline
bridge-utils in core repo
Offline
I never got this to work quite right with DHCP. How would I set this up if one interface needs to get an IP w/ DHCP while the other interface, that is bridged with the first one, has to host DHCP? Basically the same effect as selecting two interfaces in XP, right clicking, and selecting "Bridge connections".
Offline
Any idea?
Offline
Windows has confused you.
samlt gave the correct answer to "how do you bridge interfaces in Linux?" but Windows is not doing that, even though it says it is. You're looking for a NAT (network Address Translation) setup, where you have one IP address on one side, a different IP address on the other side, and routing going on in between.
This page should be useful - if you need more, there's plenty out there for Google to find.
Offline
Okay, I am getting very close! I installed dnsmasq and I'm messing around with it. My home network is based off a Linksys router that serves DHCP on 192.168.1.100 to 192.168.1.150. Its IP is 192.168.1.1. What I'm trying to do is share my laptop's connected-by-wireless internet connection with a desktop computer via crossover cable.
On my laptop, if I set the IP of my ethernet connection I want to share to 192.168.1.20 and serve IP addresses with dnsmasq from 192.168.1.50 to 192.168.1.99, it doesn't work. I would assume that's because there are two DHCP servers (my laptop and the router) on the subnet, right? If I set my ethernet adapter to 192.168.0.1 and serve 192.168.0.50 to 192.168.0.99, it works! My desktop can get an IP and ping my laptop. However, it can't get online or ping anything on the 192.168.1.x side, which is what I'm trying to accomplish
The real snarl that is confusing me right now is that my dnsmasq host's /etc/resolv.conf file has "nameserver 192.168.1.1" in it (my router), but when I look at resolv.conf on the client I'm trying to get online, it has "nameserver 192.168.0.1" This is when serving IPs 192.168.0.50 through 192.168.0.99. Why is dnsmasq ignoring my /etc/resolv.conf file?
Last edited by synthead (2008-04-14 07:36:24)
Offline
I'm still reading, and I found that dnsmasq just serves DHCP Oh the joys of learning something new ... hah!
So I setup shorewall the way I thought would work well for what I'm doing, but when I try to run it:
[root@pwn etc]# /etc/rc.d/shorewall start
:: Starting shorewall [FAIL]
It doesn't say what is wrong I'm looking through the configs and they look right, even though I'm pretty sure there's something off a little somewhere ... is there a log I can look at to see what the problem is? If I tail /var/log/messages.log, there isn't anything in there for shorewall.
Offline
http://wiki.archlinux.org/index.php/Internet_Share
OUR WIKI IS THE BOMB
Yes, the internet works now. Using iptables in conjunction with dnsmasq. iptables was very daunting to me, ouch. But I got it. Oh man this is awesome. It's funny, once you figure something complicated out in Linux, you feel like you've just upped a level like in an RPG or something
Offline