Hi,
I'd like to develop a wireless AP Web interface to manage some user access/accounts (maybe PHP/SQL) but I'm stuck with the network configuration, maybe someone could help me ?
I'm using a Debian as server connected to internet through a wireless network on wlan0 and a wireless access point on this server on eth0 to serve clients.
My first aim is to simply give access to Internet to the clients then later I'll redirect them on an apache server for authentication and for restricting navigation to some specific sites.
I manage to offer some IP to clients with isc-dhcp-server through the AP and eth0 but I don't manage to route the traffic from clients to wlan0 connection. At this moment, I'm testing with a PS3 and it says "DNS error".
Here are my network configurations:
- Wireless AP on eth0
192.168.121.127 : 255.255.255.0 : 192.168.121.1
- eth0
192.168.121.1 : 255.255.255.0 : 192.168.121.1
Through the Network Manager, in "Routes...", I checked "Use this connection only for resources on its network" else I didn't manage to connect to Internet with the server because it tries to go on eth0 instead of wlan0.
- wlan0
192.168.0.12 : 255.255.255.0 : 192.168.0.254
- my dhcpd.conf is:
Code:
...
subnet 192.168.121.0 netmask 255.255.255.0 {
range 192.168.121.100 192.168.121.150;
option domain-name-servers 192.168.0.254:
option routers 192.168.121.1;
}
...
(I will reduce the network ranges/sizes later according to the number of clients)
At this point there's already something I don't understand well. Is it correct to give 192.168.0.254 as DNS to clients ? Shouldn't it rather be the eth0 IP (192.168.121.1) ?
Then I'm stuck, I guess I need to add a route but I don't understand well the "gw" argument of "route add". I tried this without success:
Code:
route add -net 192.168.121.0 netmask 255.255.255.0 gw 192.168.0.254
Same as for the dhcpd.conf, I wonder if "gw" shouldn't be the eth0 IP because it acts like a gateway for the network 192.168.121.0 ?
Thanks in advance for any advice