DD-WRT MJMD5 w/Multiple ATA's

magicJack Tips and Tricks

Moderators: Bill Smith, Pilot

Post Reply
hesantos2004
MagicJack Newbie
Posts: 6
Joined: Sun Jun 22, 2008 12:02 am

DD-WRT MJMD5 w/Multiple ATA's

Post by hesantos2004 »

AFTER STRUGLING FOR A FEW DAYS TRYING TO GET A SOLUTION ON HOW TO MAKE MULTIPLE ATA'S WORK WITH A SINGLE ROUTER, I DECIDED TO USE
THE MAGICJACK PROXY DESIGNED FOR OPENWRT IN MY DD-WRT ROUTER AND IT WORKS.. I NOW HAVE ALL MY FAMILY AND FRIENDS CONNECTED TO MY ROUTER.

THIS IS ASSUMING THAT YOUR ROUTER HAS DD-WRT INSTALLED WITH JJFS ENABLED AND READY.

I HAVE TESTED THIS USING AN ASUS WL-520GU.


LOGIN TO THE ROUTER USING YOUR TELNET APPLICATION FOR THIS!!

1. mkdir /jffs/mjp/

2. cd /jffs/mjp/

3. wget http://pagemen.110mb.com/mjproxy.zip -O /jffs/mjp/mjproxy && chmod +x /jffs/mjp/mjproxy && ls /jffs/mjp

TYPE THIS WHILE STILL IN TELNET JUST TO MAKE SURE IS WORKING.

/jffs/mjp/bin/mjproxy 0.0.0.0 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD


LOGIN TO YOUR ROUTER USING THE WEBROWSER, GO TO ADMINISTRATION AND THEN COMMANDS TYPE THE FOLLWING IN THERE;

sleep30
/jffs/mjp/bin/mjproxy 0.0.0.0 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

IF YOU NEED TO ADD ADDITTIONAL ATA'S JUST TYPE THE FOLLOWING..

sleep 30
/jffs/mjp/bin/mjproxy 0.0.0.0 5071 proxy01.XXXXXXXX.talk4free.com 5070 YOURPASSWORD

sleep 30
/jffs/mjp/bin/mjproxy 0.0.0.0 5072 proxy01.XXXXXXXX.talk4free.com 5070 YOURPASSWORD

CLICK SAVE TO STARTUP. NOW THE APPLICATION SHOULD START EVERY TIME YOUR ROUTER IS REBOOTED.


FORWARDING THESE PORTS IN YOUR ROUTER IS ALSO NECESSARY. IF YOU NEED HELP ON THIS PLEASE GO HERE, http://www.dd-wrt.com/wiki/index.php/Im ... orward.jpg

I TAKE ABSOLUTELY NO CREDIT FOR THIS I'M JUST SHARING MY EXPERIENCE WITH EVERYONE ELSE IN THE FORUM.
steve_togo
MagicJack Expert
Posts: 84
Joined: Tue Dec 09, 2008 5:32 pm

Re: DD-WRT MJMD5 w/Multiple ATA's

Post by steve_togo »

hesantos2004 wrote:AFTER STRUGLING FOR A FEW DAYS TRYING TO GET A SOLUTION ON HOW TO MAKE MULTIPLE ATA'S WORK WITH A SINGLE ROUTER, I DECIDED TO USE
THE MAGICJACK PROXY DESIGNED FOR OPENWRT IN MY DD-WRT ROUTER AND IT WORKS.. I NOW HAVE ALL MY FAMILY AND FRIENDS CONNECTED TO MY ROUTER.

THIS IS ASSUMING THAT YOUR ROUTER HAS DD-WRT INSTALLED WITH JJFS ENABLED AND READY.

I HAVE TESTED THIS USING AN ASUS WL-520GU.


LOGIN TO THE ROUTER USING YOUR TELNET APPLICATION FOR THIS!!

1. mkdir /jffs/mjp/

2. cd /jffs/mjp/

3. wget http://pagemen.110mb.com/mjproxy.zip -O /jffs/mjp/mjproxy && chmod +x /jffs/mjp/mjproxy && ls /jffs/mjp

TYPE THIS WHILE STILL IN TELNET JUST TO MAKE SURE IS WORKING.

/jffs/mjp/bin/mjproxy 0.0.0.0 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD


LOGIN TO YOUR ROUTER USING THE WEBROWSER, GO TO ADMINISTRATION AND THEN COMMANDS TYPE THE FOLLWING IN THERE;

sleep30
/jffs/mjp/bin/mjproxy 0.0.0.0 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

IF YOU NEED TO ADD ADDITTIONAL ATA'S JUST TYPE THE FOLLOWING..

sleep 30
/jffs/mjp/bin/mjproxy 0.0.0.0 5071 proxy01.XXXXXXXX.talk4free.com 5070 YOURPASSWORD

sleep 30
/jffs/mjp/bin/mjproxy 0.0.0.0 5072 proxy01.XXXXXXXX.talk4free.com 5070 YOURPASSWORD

CLICK SAVE TO STARTUP. NOW THE APPLICATION SHOULD START EVERY TIME YOUR ROUTER IS REBOOTED.


FORWARDING THESE PORTS IN YOUR ROUTER IS ALSO NECESSARY. IF YOU NEED HELP ON THIS PLEASE GO HERE, http://www.dd-wrt.com/wiki/index.php/Im ... orward.jpg

I TAKE ABSOLUTELY NO CREDIT FOR THIS I'M JUST SHARING MY EXPERIENCE WITH EVERYONE ELSE IN THE FORUM.
Hi.,

This and various other methods have been experimented, I have the same router as you and i had trouble configuring it with multiple units., End of experiment I realized it had something to do with ATA's and finally got it to work after a lot of struggle., But I am still unable to use the softphone., like xlite Try using it out of ur home n/w and let us know if u are still able to register and also if you can recv incoming calls on the line u have registered on port 5072,
mpwebster
MagicJack Newbie
Posts: 8
Joined: Tue Aug 26, 2008 8:55 am

Post by mpwebster »

I have my ata working but I want to do as you said let my family connect to my router from outside the network. Can you give me more detail on how your setup is. I had them use my ip with 5071 as the port. I then went into my router in command and added the sleep 30 with the password as i did on my line. I also did the port forward. Is it going to be the same ports as on the link 80? I may not be clear enough as to what I am looking for but I basically need help setting up an ata on my router from outside my network.
Thanks for any help
VaHam
Dan Should Pay Me
Posts: 851
Joined: Wed Feb 13, 2008 8:02 pm

Post by VaHam »

mpwebster wrote:I have my ata working but I want to do as you said let my family connect to my router from outside the network. Can you give me more detail on how your setup is. I had them use my ip with 5071 as the port. I then went into my router in command and added the sleep 30 with the password as i did on my line. I also did the port forward. Is it going to be the same ports as on the link 80? I may not be clear enough as to what I am looking for but I basically need help setting up an ata on my router from outside my network.
Thanks for any help
Instead of opening up security holes to the world, you may want to look into creating a VPN for the family members you wish to have access. That way they would have access inside your router/firewall and can use the ata just as you would do.

There are lots of ways to setup VPN's out there. The free for personal use Teamviewer software which is handy for providing remote help to friends and family even has VPN capability which is easy to use and understand.
Sad Times Ahead for this Obamanation !!!! Psalms 109:8
mpwebster
MagicJack Newbie
Posts: 8
Joined: Tue Aug 26, 2008 8:55 am

Post by mpwebster »

I went to Teamviewer and read through the site and downloaded the software. I don't think this would work because I keep my computer off and run mjproxy on my router. Is this correct or can I still run teamviewer without a computer running?
From what I read you can allow another ata to connect from outside the network. The last post that explained how to do this was for openwrt so I am a little confused as to what my exact settings need to be for dd-wrt.
Thanks again
bigstevep
magicJack Apprentice
Posts: 12
Joined: Sun Mar 29, 2009 11:36 pm

Post by bigstevep »

Are these instructions for running multiple MJ's on a PAP2 still working? I can only get one working on 5070. Anything I put on 5071 does not work. I have read through all the threads on the site an still a no go so I'm wondering if running multiple MJ's on the ATA still works.
steve_togo
MagicJack Expert
Posts: 84
Joined: Tue Dec 09, 2008 5:32 pm

Post by steve_togo »

YES it does work and it is very easy to setup once u know how. I did mine with a dd-wrt install., I did not use open-wrt package at all.

Follow my instructions below and u should have it working..

In startup create network interfaces for the number of MJ's u are planning to use

ifconfig br:0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.101
ifconfig br:0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.102

Add these 2 lines after creating the interfaces
/jffs/mjp/bin/mjproxy 192.168.1.101 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

/jffs/mjp/bin/mjproxy 192.168.1.102 5072 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

Now in Firewall open the above 2 interfaces if you want to access MJ outside ur home n/w
iptables -I input -d 192.168.1.101 -p udp --dport 5070 -j accept
iptables -I input -d 192.168.1.102 -p udp --dport 5072 -j accept

In short ur script should like this for startup

Sleep 30
ifconfig br:0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.101
ifconfig br:0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.102
Sleep 30
/jffs/mjp/bin/mjproxy 192.168.1.101 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

/jffs/mjp/bin/mjproxy 192.168.1.102 5072 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

Note: 192.168.1.101 is used bcoz that is an unused ip in my system. So ensure u are using an unused ip as PAP2 will connect using that IP. in the above eg ports 5070 and 5072 are used so remember to use the same one in PAP2.

The firewall step is reqd only if u want to access MJ outside ur home. If my steps are not working lemme know as you might have to forward RTP packets in ur PAP2. I have my setup functioning with no issues and I can also access my MJ outside my home using a PAP2.
Zeeble
MagicJack Newbie
Posts: 3
Joined: Sat Dec 05, 2009 8:02 am

Post by Zeeble »

steve_togo wrote:YES it does work and it is very easy to setup once u know how. I did mine with a dd-wrt install., I did not use open-wrt package at all.

Follow my instructions below and u should have it working..

In startup create network interfaces for the number of MJ's u are planning to use

ifconfig br:0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.101
ifconfig br:0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.102

Add these 2 lines after creating the interfaces
/jffs/mjp/bin/mjproxy 192.168.1.101 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

/jffs/mjp/bin/mjproxy 192.168.1.102 5072 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

Now in Firewall open the above 2 interfaces if you want to access MJ outside ur home n/w
iptables -I input -d 192.168.1.101 -p udp --dport 5070 -j accept
iptables -I input -d 192.168.1.102 -p udp --dport 5072 -j accept

In short ur script should like this for startup

Sleep 30
ifconfig br:0 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.101
ifconfig br:0 192.168.1.102 netmask 255.255.255.0 broadcast 192.168.1.102
Sleep 30
/jffs/mjp/bin/mjproxy 192.168.1.101 5070 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

/jffs/mjp/bin/mjproxy 192.168.1.102 5072 proxy01.xxxxxxxx.talk4free.com 5070 YOUR_PASSWORD

Note: 192.168.1.101 is used bcoz that is an unused ip in my system. So ensure u are using an unused ip as PAP2 will connect using that IP. in the above eg ports 5070 and 5072 are used so remember to use the same one in PAP2.

The firewall step is reqd only if u want to access MJ outside ur home. If my steps are not working lemme know as you might have to forward RTP packets in ur PAP2. I have my setup functioning with no issues and I can also access my MJ outside my home using a PAP2.
I think my router is hosed or is just physically incapable of doing anything related to these projects. I currently have a WRT54G v8 running (11/25/09) DD-WRT Micro-plus_ssh. I am running my network with DHCP starting at 10.10.1.100 Router is 10.10.1.1 and the subnet is 255.255.0.0.

So lets begin my lists of headaches.

I recently bought a MagicJack for a "catch-all" number to use as a landline for testing purposes. Then if all goes well, buy another as a "work" line for when I open up a small "I fix your stuff and modify things for you" business out of the apartment. So back to the story, I bought a Magicjack and a Linksys PAP2T-NA, the ATA will be here Tuesday and im trying to get the router's groundwork set up first. So here we go...

Since I am running a micro distro a I have to run/install everything into ram and download it each time upon startup (not a big deal)

So lets SSH...

wget http://pagemen.110mb.com/mjproxy.zip -O /tmp/mjproxy
chmod a+x /tmp/mjproxy


Success, I see it in /tmp and permissions set.

/tmp/mjproxy 0.0.0.0 5070 proxy01.stlouis.talk4free.com 5070 PASSWORD
/tmp/mjproxy: can't resolve symbol 'htons'


I have no idea where the 'htons' issue comes from and in the dark with that. So if you could enlighten me that would be great.

So I've stumbled this post about how to configure multiple ATAs in DDWRT and not just forwarding ports like in the OpenWRT forum. So I figured I can set all of this up and when the time comes I can just set the MJ credentials/plug a phone into the PAP2T and be ready to go. No Muss, No Fuss right? Still totally wrong.

So I go to create the new IPs for the virtual device with ifconfig like in your post and I get these results...

ifconfig br:0 10.10.1.10 netmask 255.255.0.0 broadcast 10.10.1.10
ifconfig: SIOCSIFADDR: No such device


I tried assigning an IP in the DHCP range with the same result. So I'm left scratching my head. I cannot get mjproxy to even start let alone assign virtual devices for the ATA to point to.

And ideas highly appreciated
steve_togo
MagicJack Expert
Posts: 84
Joined: Tue Dec 09, 2008 5:32 pm

Post by steve_togo »

br:0 10.10.1.10 br:0 is ur LAN interface and ur ip should not be 10.10.1.10 as ur dhcp starts at 100 so go for a number above 100 it will start working.

HTONS... Is ur installation correct for mjprxy... If not i would suggest going with tomato as my instructions still hold good for tomato. Tomato requires a smaller foot print... If u have a choice of wifi router i strongly suggest Asus wl-520gu, I have a linksys also but Asus are the best...
Zeeble
MagicJack Newbie
Posts: 3
Joined: Sat Dec 05, 2009 8:02 am

Post by Zeeble »

I tried it with an address within the dhcp list as well with the same result. Tomato is an impossibility because I don't have the flash space for it. DDWRT is the only solution for routers with 2mb flash.
bigstevep
magicJack Apprentice
Posts: 12
Joined: Sun Mar 29, 2009 11:36 pm

Post by bigstevep »

steve_togo thanks for trying to help on this. I think like I posted before that MJ changed something in the dongles. I can get password and id but when I try putting them into a known working config (same as my old MJ dongle) changing that data and proxy I can't connect. I have three new ones here to test and all are the same. I wonder if they changed the header or something in the new ones. Hopefully we can resolve this as I've spent many hours testing without positive result.
steve_togo
MagicJack Expert
Posts: 84
Joined: Tue Dec 09, 2008 5:32 pm

Post by steve_togo »

bigstevep wrote:steve_togo thanks for trying to help on this. I think like I posted before that MJ changed something in the dongles. I can get password and id but when I try putting them into a known working config (same as my old MJ dongle) changing that data and proxy I can't connect. I have three new ones here to test and all are the same. I wonder if they changed the header or something in the new ones. Hopefully we can resolve this as I've spent many hours testing without positive result.
For the new ones i believe u do not require a proxy, You can use the credentials directly.
Post Reply