Hi,
I’m trying to work out how to route all traffic destined for the internet from all devices connected to eth0 to a wireless router access point via wlan0 on my Slackware box.
I also have dhcpd providing ip addresses on the same subnet to any device connected to both eth0 and wlan0.
Diagram:
If I connect to the router/access point via wireless or directly to the Server via a crossover cable I can obtain an ip address from dhcpd, so that works. As far as I can see I just need to how to route between eth0 and wlan0 then I can provide internet access to those devices!Code:____________ ____________ [ ]=============> (wifi) ==============>[ Router / ] |Workstations| __________ |Access Point| 192.168.2.1 [____________]==>(eth0)==>[ ]<==(wlan0)==>[____________] 192.168.2.253| Server |192.168.2.254 [__________]
ifconfig:
route:Code:eth0 Link encap:Ethernet HWaddr 00:01:2e:27:ae:a3 inet addr:192.168.2.253 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::201:2eff:fe27:aea3/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:130 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8422 (8.2 KiB) TX bytes:1184 (1.1 KiB) Interrupt:21 Base address:0x4000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1516 (1.4 KiB) TX bytes:1516 (1.4 KiB) wlan0 Link encap:Ethernet HWaddr 00:24:23:09:14:58 inet addr:192.168.2.254 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::224:23ff:fe09:1458/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:825 errors:0 dropped:0 overruns:0 frame:0 TX packets:675 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:70391 (68.7 KiB) TX bytes:64295 (62.7 KiB)
dhcpd.conf:Code:Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 * 255.255.255.0 U 0 0 0 wlan0 192.168.2.0 * 255.255.255.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 192.168.2.1 0.0.0.0 UG 1 0 0 wlan0
Code:# dhcpd.conf # # Configuration file for ISC dhcpd (see 'man dhcpd.conf') # # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. authoritative; ddns-update-style none; # Allow bootp requests allow bootp; # Point to the TFTP server: next-server 192.168.2.253; # Default lease is 1 week (604800 sec.) default-lease-time 604800; # Max lease is 4 weeks (2419200 sec.) max-lease-time 2419200; subnet 192.168.2.0 netmask 255.255.255.0 { # option domain-name "my.lan"; option broadcast-address 192.168.2.255; option subnet-mask 255.255.255.0; option domain-name-servers 192.168.2.1; option routers 192.168.2.1; range 192.168.2.2 192.168.2.99; range dynamic-bootp 192.168.2.100 192.168.2.150; # use-host-decl-names on; # if substring (option vendor-class-identifier, 0, 9) = "PXEClient" { # filename "/slackware-12.2/pxelinux.0"; # } }
Bookmarks