Got a question regarding iptables-configuration!
I've got a weird setup at home in which both my cable modem and my printer is connected to the WAN-port on my WRT54GL with the help of a switch!
----------- ----------
| WRT54GL |--wan-port--| Switch |
----------- ----------
| | | | | | |
local/wifi Cable Printer
public ip 192.168.0.202
The WRT54GL box is running Kamikaze 7.09 (kernel 2.4 brcm, the standard stuff), and got no fancy packages or configuration yet. I just set the local IP (on the WRT54GL) to 192.168.0.254, and the dhcp range is from 1 to 150, other that that I have not edited much. The printer is configured with a static ip, 192.168.0.202. It has to be connected through wan because of physical placement, as the cable modem and printer is in one room, and the WRT54GL is in another.
And here the fun begins!
I manage, when I've ssh'ed myself into kamikaze, to ping the printer if I manually make a new interface on the WAN-interface and then make a route:
root@Ruter:~# ifconfig eth0.1:1 192.168.0.200 netmask 255.255.255.0 up
root@Ruter:~# route add -net 192.168.0.202 netmask 255.255.255.255 dev eth0.1:1
But accessing the printer from shell is of course not enough! How should I configure iptables to allow requests to 192.168.0.202 to get routed the right way? I want everyone on the local net to be able to access the printer...
Would be greatly thankful if anyone could help me with this :)