Lieber Besucher, herzlich willkommen bei: GentooForum.de. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »D.Derigs« (17.11.2005, 21:16)
Zitat
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d. To create a more complete configuration,
# please review /etc/conf.d/net.example and save your configuration
# in /etc/conf.d/net (this file !).
config_eth0=("192.168.0.3 netmask 255.255.255.0")
routes_eth0=("default gw 192.168.0.1")
config_eth1=("192.168.0.4 netmask 255.255.255.0")
routes_eth1=("default gw 192.168.0.1")
adhoc_essid_eth1="X-Server"
mode_eth1="ad-hoc"
essid_eth1="X-Server"
channel_eth1="9"
Zitat
* Starting eth1
* Configuring wireless network for eth1
Warning: Driver for device eth1 has been compiled with version 18
of Wireless Extension, while this program supports up to version 17.
Some things may be broken...
* eth1 connected to "X-Server" at 00:00:00:00:00:00
* in ad-hoc mode (WEP disabled)
* Bringing up eth1
* 192.168.0.4 [ ok ]
* Adding routes
* default gw 192.168.0.1 ... [ !! ]
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
#!/sbin/runscript # WLAN - Ethernet Bridge # Copyrigth by D.Derigs, www.x-linux.de EXTIF="eth0" INTIF="eth1" start() { ebegin "Enabling WLAN <==> Ethernet Bridge" # depmod -a modprobe ip_tables modprobe ip_conntrack modprobe ip_conntrack_ftp modprobe iptable_nat modprobe ip_nat_ftp echo "1" > /proc/sys/net/ipv4/ip_forward echo "1" > /proc/sys/net/ipv4/ip_dynaddr iptables -P INPUT DROP iptables -F INPUT iptables -P OUTPUT ACCEPT iptables -F OUTPUT iptables -P FORWARD DROP iptables -F FORWARD iptables -t nat -F iptables -A INPUT -i $INTIF -j ACCEPT iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i $EXTIF -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -i $EXTIF -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT iptables -A FORWARD -j LOG iptables -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE eend ${?} } stop() { ebegin "Disabling WLAN <==> Ethernet Bridge" echo "0" > /proc/sys/net/ipv4/ip_forward iptables -P INPUT ACCEPT iptables -F INPUT iptables -P OUTPUT ACCEPT iptables -F OUTPUT iptables -P FORWARD ACCEPT iptables -F FORWARD iptables -t nat -F eend ${?} } |