V24: WLAN separate from LAN, with independent DHCP

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 21:26, 16 September 2008 (edit)
TestedDoughnut (Talk | contribs)
(Configuration)
← Previous diff
Revision as of 21:28, 16 September 2008 (edit) (undo)
TestedDoughnut (Talk | contribs)
(The previous tutorial sucked)
Next diff →
Line 1: Line 1:
-The goal is to separate the WLAN and LAN ports from each other using the v24 GUI.+The goal of this article is to separate the wireless LAN from the hardwired LAN, with an independent class c network for both interfaces. For security purposes, we will prevent communication between both networks, as well as between wireless clients. This way, the wireless network is able to be a little more lax on security without the threat of unsecured access to the wired network. This is a good implementation for wireless cafés and other businesses that provide wireless Internet access to their customers.
- +
- +
-===Overview===+
- The goal of this article is to separate the wireless LAN from the hardwired LAN, with an independent class c network for both interfaces. For security purposes, we will prevent communication between both networks, as well as between wireless clients. This way, the wireless network is able to be a little more lax on security without the threat of unsecured access to the wired network. This is a good implementation for wireless cafés and other businesses that provide wireless Internet access to their customers.+
===Setup=== ===Setup===
- The configuration takes about 20 minutes to complete. For this tutorial, I used a WRT54GL v1.1 with DD-WRT NoKaid v24 sp1. I've also done this setup on a WRT54G v8.2 with DD-WRT Micro v24 sp1, so I imagine that any version of DD-WRT v24 sp1 would work with this. For this scenario, we will set the wired network to 192.168.1.1/24 and the wireless network to 192.168.2.1/24.+The configuration takes about 20 minutes to complete. For this tutorial, I used a WRT54GL v1.1 with DD-WRT NoKaid v24 sp1. I've also done this setup on a WRT54G v8.2 with DD-WRT Micro v24 sp1, so I imagine that any version of DD-WRT v24 sp1 would work with this. For this scenario, we will set the wired network to 192.168.1.1/24 and the wireless network to 192.168.2.1/24.
Line 12: Line 8:
====Step 1==== ====Step 1====
- First, we will log into the router interface and go to Wireless > Basic Settings. Change Network Configuration from Bridged to Unbridged. This will bring up 3 new settings. For IP Address enter 192.168.2.1 and for Subnet Mask enter 255.255.255.0. Click Apply Settings. Now click on Wireless > Advanced Settings. Change AP Isolation from Disable to Enable and click Apply Settings. This will prevent wireless clients from communicating with each other. As far as wireless encryption goes, that's up to your preferences. I'm not going to cover it in this article.+First, we will log into the router interface and go to Wireless > Basic Settings. Change Network Configuration from Bridged to Unbridged. This will bring up 3 new settings. For IP Address enter 192.168.2.1 and for Subnet Mask enter 255.255.255.0. Click Apply Settings. Now click on Wireless > Advanced Settings. Change AP Isolation from Disable to Enable and click Apply Settings. This will prevent wireless clients from communicating with each other. As far as wireless encryption goes, that's up to your preferences. I'm not going to cover it in this article.
====Step 2==== ====Step 2====
- Now that we have the wireless network setup, we need to have the DHCP server issue IP addresses within its range. To do this, first go to Setup > VLANs. Scroll to the bottom and change Wireless from LAN to None. Click Apply Settings. Now go to Setup > Networking. Scroll to the bottom and click Add under Multiple DHCP Server. This will bring up several new options. Set the first option to eth1 (the wireless adapter) and leave the other default settings as they are. Click Apply Settings.+Now that we have the wireless network setup, we need to have the DHCP server issue IP addresses within its range. To do this, first go to Setup > VLANs. Scroll to the bottom and change Wireless from LAN to None. Click Apply Settings. Now go to Setup > Networking. Scroll to the bottom and click Add under Multiple DHCP Server. This will bring up several new options. Set the first option to eth1 (the wireless adapter) and leave the other default settings as they are. Click Apply Settings.
====Step 3==== ====Step 3====
- Now we have the wireless and wired on their own class c networks, all we have to do now is prevent them from talking to each other. Goto Administration > Commands. Now put the following commands into the text box:+Now we have the wireless and wired on their own class c networks, all we have to do now is prevent them from talking to each other. Goto Administration > Commands. Now put the following commands into the text box:
<pre> <pre>

Revision as of 21:28, 16 September 2008

The goal of this article is to separate the wireless LAN from the hardwired LAN, with an independent class c network for both interfaces. For security purposes, we will prevent communication between both networks, as well as between wireless clients. This way, the wireless network is able to be a little more lax on security without the threat of unsecured access to the wired network. This is a good implementation for wireless cafés and other businesses that provide wireless Internet access to their customers.

Contents

Setup

The configuration takes about 20 minutes to complete. For this tutorial, I used a WRT54GL v1.1 with DD-WRT NoKaid v24 sp1. I've also done this setup on a WRT54G v8.2 with DD-WRT Micro v24 sp1, so I imagine that any version of DD-WRT v24 sp1 would work with this. For this scenario, we will set the wired network to 192.168.1.1/24 and the wireless network to 192.168.2.1/24.


Configuration

Step 1

First, we will log into the router interface and go to Wireless > Basic Settings. Change Network Configuration from Bridged to Unbridged. This will bring up 3 new settings. For IP Address enter 192.168.2.1 and for Subnet Mask enter 255.255.255.0. Click Apply Settings. Now click on Wireless > Advanced Settings. Change AP Isolation from Disable to Enable and click Apply Settings. This will prevent wireless clients from communicating with each other. As far as wireless encryption goes, that's up to your preferences. I'm not going to cover it in this article.

Step 2

Now that we have the wireless network setup, we need to have the DHCP server issue IP addresses within its range. To do this, first go to Setup > VLANs. Scroll to the bottom and change Wireless from LAN to None. Click Apply Settings. Now go to Setup > Networking. Scroll to the bottom and click Add under Multiple DHCP Server. This will bring up several new options. Set the first option to eth1 (the wireless adapter) and leave the other default settings as they are. Click Apply Settings.

Step 3

Now we have the wireless and wired on their own class c networks, all we have to do now is prevent them from talking to each other. Goto Administration > Commands. Now put the following commands into the text box:

iptables  -t nat -I PREROUTING -i eth1 -d $(nvram get lan_ipaddr)/$(nvram get lan_netmask) -j DROP
iptables  -t nat -I PREROUTING -i br0 -d $(nvram get eth1_ipaddr)/$(nvram get eth1_netmask) -j DROP

Click Save Firewall, reboot the router for good measure, and BAM! You now have your LAN on the 192.168.1.1/24 network and your wireless on 192.168.2.1/24, without access to each other.