QUOTE(azmihamzah @ Mar 5 2007, 12:19 AM)
Thanks for the info, missed that part actually. I started joing dd-wrt family 3 pages after that post...
i'm still noob about iptables thingy
so, the idea behind this is to set up a virtual lan on wan port and reroute NAT to vlan ip? Because my lan ip is little different so i might have to change your command.
eg : if my lan ip is on 169.254.1.0/24 (means router at 169.254.1.1 and client start from .2) and my modem still using 192.168.1.1
so i just type
ifconfig vlan1:0 192.168.1.2 netmask 255.255.255.0
iptables -t nat -I POSTROUTING -o vlan1 -d 192.168.1.0/24 -j SNAT --to-source 192.168.1.2
correct me if i'm wrong...
btw, my lan ip is not actually 169.254.1.0/24, its just an example
ok i explain wat it means by the code if u configure like this
ifconfig vlan1:0 192.168.1.2 netmask 255.255.255.0
iptables -t nat -I POSTROUTING -o vlan1 -d 192.168.1.0/24 -j SNAT --to-source 192.168.1.2
VLAN1 is actually ur WAN which means == ur modem (Not all dd-wrt uses Vlan1 as wan)you have to check this in Setup-VLAN
so ur modem must be in same ip group that is 192.168.1.X and the dchp modem range must start from 192.168.1.1 to 192.168.1.X and netmask 255.255.255.0
to actually communicate with ur router you must set ur router in same segment that is 192.168.X.X and different group
eg u can use 192.168.2.X , 192.168.3.X or so on in your router
192.168.2.X = group #2
192.168.3.X = group #3
you set different group is just to avoid clash of ip with the modem and ur router.
Added on March 5, 2007, 10:06 pmQUOTE(azmihamzah @ Mar 5 2007, 09:39 PM)
so, in my case...
router : 169.254.x.x
modem : 192.168.1.1
cannot la?
if you read my above explanation of course it cannot. but if can just tell us lor. logically it cannot.
Added on March 5, 2007, 10:09 pmQUOTE(lshock @ Mar 5 2007, 09:42 PM)
if both router and modem are not the same ip, there is no need to change right?
i didn't get wat u mean.. plase put example of ur modem n router ip
This post has been edited by stmu: Mar 5 2007, 10:09 PM