Jag försöker att sätta upp en trådlös router under Ubuntu 10.10 Server med hjälp av denna guiden: https://help.ubuntu.com/community/Router . Jag använder mig av moderkortets nätverkskort för det externa nätet och ett D-Link DWL-G510 till det interna trådlösa.
lspci:
Kod: Markera allt
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
05:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11g
Kod: Markera allt
# Set up the local loopback interface
auto lo
iface lo inet loopback
# Set up the External interface
#
# For every xxx.xxx.xxx.xxx, enter the numeric address given to you
# by your Internet provider. Don't forget to change eth0 to the proper
# name of the external interface if applicable.
#
auto eth0
iface eth0 inet static
address 172.16.0.6
netmask 255.255.128.0
gateway 172.16.0.4
# Set up the internal wireless network
#
# Don't forget to change wlan0 to the proper name of the internal
# wireless network interface if applicable.
#
#
# If you would like to use WEP, uncomment the line 'wireless-key'
# and replace '<key goes here>' with a WEP key.
#
# You may also change the network essid and channel.
#
auto wlan0
iface wlan0 inet static
wireless-mode master
wireless-essid "UbuntuWireless"
wireless-channel 1
wireless-key <*******************************>
address 172.16.128.2
network 172.16.128.0
netmask 255.255.128.0
broadcast 172.16.255.255
Kod: Markera allt
echo -e "\n\nLoading simple rc.firewall-iptables version $FWVER..\n"
DEPMOD=/sbin/depmod
MODPROBE=/sbin/modprobe
EXTIF="eth0"
INTIF="wlan0"
echo " External Interface: $EXTIF"
echo " Internal Interface: $INTIF"
#======================================================================
#== No editing beyond this line is required for initial MASQ testing ==
echo -en " loading modules: "
echo " - Verifying that all kernel modules are ok"
$DEPMOD -a
echo "----------------------------------------------------------------------"
echo -en "ip_tables, "
$MODPROBE ip_tables
echo -en "nf_conntrack, "
$MODPROBE nf_conntrack
echo -en "nf_conntrack_ftp, "
$MODPROBE nf_conntrack_ftp
echo -en "nf_conntrack_irc, "
$MODPROBE nf_conntrack_irc
echo -en "iptable_nat, "
$MODPROBE iptable_nat
echo -en "nf_nat_ftp, "
$MODPROBE nf_nat_ftp
echo "----------------------------------------------------------------------"
echo -e " Done loading modules.\n"
echo " Enabling forwarding.."
echo "1" > /proc/sys/net/ipv4/ip_forward
echo " Enabling DynamicAddr.."
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
echo " Clearing any existing rules and setting default policy.."
iptables-restore <<-EOF
*nat
-A POSTROUTING -o "$EXTIF" -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i "$EXTIF" -o "$INTIF" -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -i "$INTIF" -o "$EXTIF" -j ACCEPT
-A FORWARD -j LOG
EOF
echo -e "\nrc.firewall-iptables v$FWVER done.\n"
Kod: Markera allt
-e
Loading simple rc.firewall-iptables version ..
External Interface: eth0
Internal Interface: wlan0
-en loading modules:
- Verifying that all kernel modules are ok
----------------------------------------------------------------------
-en ip_tables,
-en nf_conntrack,
-en nf_conntrack_ftp,
-en nf_conntrack_irc,
-en iptable_nat,
-en nf_nat_ftp,
----------------------------------------------------------------------
-e Done loading modules.
Enabling forwarding..
Enabling DynamicAddr..
Clearing any existing rules and setting default policy..
iptables-restore: COMMIT expected at line 11
-e
rc.firewall-iptables v done.
Kod: Markera allt
run-parts: /etc/network/if-pre-up.d/wireless-tools exited with return code 2
SIOCSIFADDR: No such device
wlan0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
wlan0: ERROR while getting interface flags: No such device
wlan0: ERROR while getting interface flags: No such device
Failed to bring up wlan0.