WAN side connection problem to Palantir 2.6 server
I cross-compiled the Palantir 2.6 server, and it is running on my Asus WL500gx now. I use the Palantir Windows client. The server works on my LAN, but when I try to connect to it from the WAN side I cannot make a connection. The firewall on the wl500gx is disabled.
My setup is as follows: ADSL2 modem>>>Linksys router>>>Ethernet cable>>>Linksys WiFi AP
>>>wireless connection >>>
>>>WL500gx acting as WiFi access point client>>>QuickCam Sphere
I am using Oleg's firmware.
The Linksys router (192.168.1.1) is the gateway to internet. In this router I have forwarded port 3000 and 3001 packets to the WL500gx (192.168.1.247). The WL500gx has the gateway address in its route table (route add default gw 192.168.1.1 netmask 255.255.255.0).
Before I used Palantir I used the Asus surveillance camera program in the above setup. I was able to connect from LAN and WAN without any problem. This makes me think that there is something in Palantir. It seems as if Palantir does not know the gateway address, but …? Or, perhaps, the firewall is messing something up even though it is "disabled".
In any event, the Palantir pictures are great, especially full screen, and pan and tilt work beautifully. Palantir is great.
Thanks for any help,
Why two LAN gateway addresses?
I have set the IP address wl500gx to 192.168.1.247. Part of the output of "nvram show" is as follows:
usb_webremote_x=0
lan_gateway_t=192.168.1.247
qos_maxbw_x=
That is, the lan gateway address in the nvram is set equal to the IP address of the wl500gx automatically.
The wl500gx is set up to be a bridge, br0.
I have also used the route command to set the LAN gateway to 192.168.1.1 in the route table shown below.
[admin@(none) /]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 255.255.255.0 UG 0 0 0 br0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
So I seem to have two LAN gateway addresses, and that obviously doesn't make sense.
However, with exactly that setup I was able to use the Webcam utility in the Asus: it used 192.168.1.1 as the gateway. The utility worked correctly.
Question 1: Does the route table lan gateway address take precedence over the nvram lan gateway address?
Question 2: Could the existence of two gateway addresses be the cause of my problem with Palantir.
Question 3: If I try the following script
nvram set lan_gateway_t=192.168.1.1
nvram commit
reboot
will bad things happen? Will the IP address of the wl500gx be changed automatically to 192.168.1.1? What does the "t" in lan_gateway_t mean?
Thanks for any help.
This sure is a lot of work to get a surveillance camera!
Now connected to Palantir 2.6 from the WAN side
I finally was able to connect to Palantir 2.6 from the WAN side. The problem was my fault: I don't know enough about Linux yet. After reading some more in my brand new Linux books I saw my silly mistake: I set the gateway up incorrectly.
THE WRONG WAY:
route add default gw 192.168.1.1 netmask 255.255.255.0
which yields the following routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 255.255.255.0 UG 0 0 0 br0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
THE CORRECT WAY:
route add default gw 192.168.1.1 (that is, do not enter the netmask)
which yields the following routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.1 0.0.0.0 UG 0 0 0 br0
IN THE CORRECT WAY THE GATEWAY IS THE LAST IN THE LIST! IN THE WRONG WAY IT IS FIRST. MOREOVER, THE Genmasks are different.
Since the way the routing table is used is well documented (I now know!), I will just state a couple of key points. Suppose that I am trying to connect to Google (66.249.93.104). The routing table will be inspected line by line from TOP TO BOTTOM. In the wrong setup the first line, the gateway, will be rejected (I am not explaining the details here), and so will the remaining two lines. In the correct setup the first two lines will be rejected, but the last line, the gateway, will be accepted. The result is a correctly functioning gateway.
A real beginner's mistake!
A final remark: I went on a long wild goose chase with the nvram. Again not going into details, every place where it mentions the lan gateway I fixed things so that it said 192.168.1.1. This did not solve my problem nor did it seem to hurt the functioning of the wl500gx. I WOULD APPRECIATE KNOWING WHAT THE CONNECTION IS BETWEEN THE nvram AND THE routing table.