How would you customize a DD-WRT configuration throught a ANDROID device paired to it? What I need is to modify a IPTABLES onstart script which forwards all traffic from one ip to another, and those two IP's are what I need to modify them from the android device in a easy way like an APP, accessing via web is not as easy as needed.

I'm thinking about creating an APP with a TELNET implemented on it, then connect via telnet and try to modify that onstart script to meet my requeriments. I've researched a little and onstart scripts are saved on NVRAM and I think that I should modify that file or add more lines to it... that's my actual idea.

How would you solve this problem?

The script is this one

iptables -t nat -A PREROUTING -i ath0 -s $IP1 -d $IP2 -j  DNAT --to-destination $IP3
iptables -t nat -A POSTROUTING -o br0 -d $IP3 -j MASQUERADE

iptables -t nat -A PREROUTING -i br0 -s $IP3 -d $IP4 -j DNAT --to-destination $IP1
iptables -t nat -A POSTROUTING -o ath0 -d $IP1 -j MASQUERADE
  • DD-WRT can be customized from a web interface. You can use your browser on the Android machine to do that. Alternatively you can use a SSH or telnet client on the Android machine to log in to the DD-WRT machine. There is no need for any kind of "pairing". – Satō Katsura Mar 1 '17 at 17:35
  • @SatoKatsura as I've mention in the post, doing it via web interface is not simply enought for the public it will be directed, so that solution is not considered. When I mean "pairing" is only to connect the android to the AP wifi, nothing more. Finally my question is more about how I could do this with telnet in a easy way, working with the nvram. Thanks for participating. – rul3s Mar 2 '17 at 10:45
  • Have you considered asking the DD-WRT guys, rather than trying to find ways around the official interface? – Satō Katsura Mar 2 '17 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.