no go trough router Lynksys
Hallo, I have iptables on linux and configured the dhcpd server, and the client windows connected to the eth2 is working, but now I would like the windows client to connect to a linksys wifi router and the router is connected to the server... but it's not working.
Here are my iptables: Code:
~# iptables-save Now I connected windows to the Linksys and the Linksys to the server. Windows now gets 192.168.1.50 from the Linksys, and the Linksys got 192.168.100.19 from the server. From the web interface of the Lynksys, I can ping yahoo.com, but from windows I can only ping the Linksys 192.168.1.1. This is the one way traffic on tcpdump... Code:
IP 192.168.1.50.4052 > 212.76.33.137.53: UDP, length 32 this is the route table Code:
Destination Gateway Genmask Flags Metric Ref Use Iface |
Disable DHCP on the Linksys box
You need to disable DHCP on the Linksys box. Also, plug your server into one of the regular ports on the Linksys box (NOT the "internet" port). In this manner, the Linksys box will act as a switch instead of a router, and DHCP will be provided by the server. I had this problem when I first tried to use my DSL modem with a Linksys router.
|
It's working as you said, but windows now doesn't get the IP from the server, I have to set it statically...
I remember that I did make it work as a router with the dhcp enabled this Linksys, somehow I did, but I don't remember how...I had another linux in my server than I lost the firewall... Do you know what I have to change to make the Linksys work as a router as well.. because otherwise I have to set statically all the windows... |
well I thought It was everything working fine... just yahoo and another site were working... I had to add the dnss staitic as well... and I cannot enter in the web configuration of the linksys with 192.168.1.1 anymore with this configuration....
any idea? |
How did your Linksys box get a DHCP assigned IP address?
If it can get a DHCP address, your Windows box should be able to. You need to make sure you have "Obtain IP address automatically" selected in the "TCP/IP" properties for your NIC. If your Windows box is running 2000 or XP, you might need to right click on the network connection icon in the system tray and select "Repair". That will flush any incorrect ARP information that might be causing you problems. |
I set statically it means that before windows didn't have static settings... so windows it was set to DHCP, in other words, obtain ip address automatically was checked.
Even repearing or release / renew IP address I got the system one.. 169.254..... I had to set statically to 192.168.100.20 with 192.168.100.1 as gateway and the DNS in resolve.conf... in iptables I changed the filter table to ACCEPT, but normally it on DROP... maybe you think that there are all those rules but they are on ACCEPT from the beginning.... |
I just wanted to add that the Linksys box doesn't seem to have any IP address... in the server I don't have that MAC address in the ARP table...
Code:
Address HWtype HWaddress Flags Mask Iface |
Questions:
1. Is the "server" running DHCP? 2. Did you connect the "server" to one of the switch ports on the Linksys box (ports 1 through 4)? 3. Did the Linksys box get an IP address when you connected the "server" to the "internet" port? If the answer to question 1 is yes, the Linksys box does not need an IP address, because it is merely acting as a switch. If the answer to question 2 is yes, then the Linksys box will not get an IP address. If the answer to question 3 is yes and the answer to question 2 is no, then who is providing DHCP? If DHCP is being provided by your internet service provider via a DSL modem or some other method, then you must connect that device to the Linksys box using one of the switch ports (ports 1 through 4). Then your Windows box will be able to see the DHCP server and get a dynamic IP address. |
1 yes
2 yes 2 I don't know but I think not because it's not in the arp table Anyway.... windows cannot get the IP automatically... it gets the IP only of connected to the server or to the cable before going to the server so it gets a PIP. |
Did you disable DHCP on the Linksys box? If not, the Windows box may get two DHCP responses and become confused.
|
Of course I did as you told me. On the first page "Server DHCP" I choosed Disable.
But still nothing... I prefere to know how to make the Linksys work as a router, because I am sure it works.. I just forgot how to do it... |
If the Linksys box cannot get an IP address using DHCP, then your DHCP is not working. If your DHCP server is not working, then you need to fix that first.
You said before that you have more than one NIC in your server. Are you sure that you are handling DHCP requests on the NIC you are using? You only need to use the Linksys box as a router in the situation where the Linksys "internet" port is connected to another device that requires the Linksys box to connect. Some DSL modems require a router to connect to them using the "internet" port because they do not provide DHCP. In these cases, the DSL modem acts as a passthrough and the Linksys box logs onto the network and get the gateway address and the addresses of the DNS servers. In my case, my DSL modem provides DHCP directly to clients and it acts as the gateway, so I just use the Linksys box as a switch. I probably need more information on your setup before I can continue to help you. But you really need to verify that the NIC you are connecting to is servicing DHCP requests. |
I can see that the dhcp is working fine in both linux and linksys...
this is the confirmation: Code:
Aug 8 05:41:36 **** dhcpd: Wrote 2 leases to leases file. lease 192.168.100.20 { starts 2 2007/08/07 12:28:49; ends 2 2007/08/07 14:28:49; tstp 2 2007/08/07 14:28:49; binding state free; hardware ethernet 00:c0:9f:c9:e3:63; uid "\001\000\300\237\311\343c"; } lease 192.168.100.19 { starts 3 2007/08/08 04:41:37; ends 3 2007/08/08 06:41:37; binding state active; next binding state free; hardware ethernet 00:1a:70:4f:95:a5; uid "\001\000\032pO\225\245"; } lease 192.168.100.19 { starts 3 2007/08/08 05:41:37; ends 3 2007/08/08 07:41:37; binding state active; next binding state free; hardware ethernet 00:1a:70:4f:95:a5; uid "\001\000\032pO\225\245"; } and the linksys works because even my neighbours can connect using my wireless and my house mate using the other cable.... |
To this question
3. Did the Linksys box get an IP address when you connected the "server" to the "internet" port? you answered 2 I don't know but I think not because it's not in the arp table Now you say the Linksys box can get an IP address via DHCP. Have you tried connecting the Windows box to a regular switch (or hub) and connecting the hub to the "server"? You may have a blown port on your Linksys box. I have personally worked with a Linksys router that had one blown port (due to electo-static discharge), but the other ports continued to work. We seem to have the following facts: 1. The Windows box can get DHCP when connected directly to the "server" 2. The Linksys box can get DHCP when connected directly to the "server" 3. Wireless clients can get DHCP when connected to the "server" via the Linksys box 4. The Windows box cannot get DHCP when connected to the "server" via the switch ports on the Linksys box This points to a problem with the switch ports on the Linksys box. One or all may be blown. |
You just need the Linksys router to work as an Access point.
Put the linux box back to the same configuration as it was before you started this with the router disconnected from the Lan. Check that the Windows boxes work as before. Press the RESET button for over 15 seconds. Wait a minute and remove and replace the power to the router. Log into the router using anything but the Linux box. No username. Password admin Change the LAN IP address to be an address on the same subnet as the server and note it. Click save Log into the router again using the new IP adress. Disable DHCP in the router. Click save. Connect the router to the Linux box using any LAN port 1 to 4 not the WAN port. The linux box will now supply the DHCP. Now you have an Actice Access point on your network. Log into the router and change the Wireless settings not forgetting to secure the wireless network. HTH |
All times are GMT -5. The time now is 06:21 AM. |