Programming and Scripting :: Gateway easily?



I don't think the bridge system works that way (don't think it has it's own ip); could be wrong though
I belive this won't work but it's worth trying...
I did this on my computer0:
Code Sample
brctl addbr bridge0
ifconfig eth0 0.0.0.0
ifconfig wlan0 0.0.0.0.
brctl addif bridge0 eth0
brctl addif bridge0 wlan0
dhcpcd bridge0
ifconfig bridge0:1 192.168.0.101

And this on my computer1:
Code Sample
ifconfig eth0 192.168.0.100
route add default gw 192.168.0.101


Well it didn't worked. At least I still have connection to this computer (computer0).  :D

Ok. It seems I have to learn how to use iptables... Or find a script to do that for me...

But if anyone has any suggestions... I'm happy to test. :)

Well, to get you a net connection with nat:

iptables -P FORWARD ACCEPT
iptables -A OUTPUT -o eth0 -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

Just wondering if you have the correct hardware setup (couldn't really tell from your diagram): are you using a crossover cable or some hub/repeater/switch on your wired connection?  I think this is required for using a NAT, not a bridge though.  But I've only used NATs... Here's a link that might be helpful: http://www.linux-foundation.org/en/Net:Bridge
Next Page...
original here.