magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks
magicJack and magicJack Plus Unofficial Technical Support. Your Magic Jack and Magic Jack Plus phone service information resource
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
HOWTO: OpenWRT MJMD5 w/Multiple ATA's & Screenshots
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index -> magicJack Tips, Tricks, and Hacks
View previous topic :: View next topic  
Author Message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Mon Jul 13, 2009 9:14 pm    Post subject: HOWTO: OpenWRT MJMD5 w/Multiple ATA's & Screenshots Reply with quote

I am putting together a “How-To” using MJMD5 with OpenWRT. I have been playing with OpenWRT for alittle over 3 years now and I am a hardcore fan of it. OpenWRT got me to love linux Very Happy. There will be no GUI interface in this How-To (less overhead). Getting setup should take you 10-15 minutes after you finish flashing the router with the proper firmware. To figure this out please visit http://www.openwrt.org

*Once you flash the router you should have LuCI GUI by default but it is not used in this tutorial.*

OpenWRT Hardware Table
http://oldwiki.openwrt.org/TableOfHardware.html

This How-To is based on Kamikaze 8.09.1.

First, head over to http://downloads.openwrt.org/kamikaze/8.09.1/ and download the latest firmware for your router. If you are running a Broadcom based router then you probably want to download from the brcm-2.4 directory. This will be a 2.4 kernel and you will be able to use your wireless card. Alternatively, you can also download from the brcm47xx directory which will run a 2.6 kernel but wireless will NOT work. Again, these two directories are for Broadcom based routers.

I am personally running a 2.6 kernel that was compiled from the trunk and which is heavily modified for my needs and it is working perfectly with MJMD5 however, this topic is beyond the scope of this How-To.

Second, once you have flashed the router with the proper firmware you should be able to telnet into it. The IP is usually 192.168.1.1 if you’re using windows just to a command prompt and type:

Code:
telnet 192.168.1.1





Now you should see the OpenWRT logo come up once you have connected. Now it's a good time to change from telnet to SSH which is more secure and highly recommended. To do this type the following command.

Code:
passwd


Enter in a strong password; if your password is weak the system will let you know like in the picture below.



If you exit out of this telnet session, telnet will be disabled and SSH will be enabled. You can download a free SSH client from the link below. You just need putty.exe

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Once you have downloaded putty.exe just enter in the routers IP address in the Host Name (orIP address) field like the picture below and click on the open button.

Your username is root
and your password is whatever you entered up above



Next, you will need internet for this to work correctly. The file that handles this is network located in /etc/config/network to edit this file we will use vi which is text editor found in every linux disto (or at least every distro I have played with)

*NOTE* If your ISP assigns an IP to you via DHCP then this step is not necessary. This step is really for DSL users that require pppoe authentication. For DHCP users go down to the MJPROXY SETUP section. But make sure your internet is up and running first.

Code:
vi /etc/config/network


which will bring up the screen below.



In order to be able to write into the file you will have to hit the "Insert" key on your keyboard once you have done that you will see at the bottom left hand corner change to "I" instead from a "-" .



Now go down to the #### WAN configuration section and make the following changes. Just use your arrow keys to go up and down left to right and backspace.

It might take some of you getting use it but don't worry, you will get it. If you screw something up don't worry just hit the ESC key and type-

*NOTE* there is a colon ":" in front of quit!

Code:
:quit!
(enter)

This will exit out of the file without saving any changes.

Now, continuing with editing the WAN configuration section. These are the changes you have to make.

Code:
option proto pppoe

Code:
option username your-pppoe-username

Code:
option password your-pppoe-password


I know everyone loves pictures/screenshots so here ya go. Very Happy



Now we have to save our changes. Just hit the ESC key and type-

*NOTE* there is a colon ":" in front of wq (wq = write & quit)

Code:
:wq
(enter)

Now, you should reboot your router just to make sure your internet is working.

Code:
reboot
(enter)

If you have Cable/FiOS that assigns you an WAN/Public IP via DHCP then you should already have internet.

You can check to see if your router is on the internet. Just type the following in a SSH terminal.

Code:
ping 4.2.2.2 -c4
(enter)

If you get replies then your all good, if you’re not getting any replies then do your normal networking troubleshooting.

MJPROXY SETUP

Now, go ahead and log into your router via SSH and make sure you can get unto the internet.

Now we need to download the mjproxy binary and make it executable. You can download this right to your routers binary directory just issue the following command.

Code:
wget http://pagemen.110mb.com/mjproxy.zip -O /sbin/mjproxy && chmod +x /sbin/mjproxy && ls /sbin
(enter)

This will download the file and put it in your /sbin directory also make it executable and show you your /sbin directory. You should see mjproxy with green lettering like the screenshot below.



Now, what we want to do is make sure the service starts every time the router starts up. I have written a small script that can help us do this. Again, issue the following command or cut-n-paste.

Code:
wget http://scareye.110mb.com/mjproxyservice.zip -O /etc/init.d/mjproxy && chmod +x /etc/init.d/mjproxy && /etc/init.d/mjproxy enable
(enter)



This will do the following.

Download mjproxyservice.zip
Rename it to mjproxy and put it in the /etc/init.d directory
Enable it so that the service will start up every time the router reboots.

if you do a ls on the /etc/rc.d directory you should see S50mjproxy in light blue and you should also see mjproxy in green in the /etc/init.d/ directory. As outlined in the screenshot below.

Code:
ls /etc/rc.d/ && ls /etc/init.d/
(enter)



We are almost done here.

Now, we need to edit the mjproxy file in /etc/init.d so you can put in your sip password. To do that just issue the following command.

Code:
vi /etc/init.d/mjproxy
(enter)

And the following screen should pop up.



Now just hit the "Insert" key (you should see the bottom left hand corner change from a "-" to an "I" which means you’re ready to edit) and change the data where it says YOURPASSWORD to your sip password and change the proxy server to your local server. Once your done just save and quit.
Hit the ESC key and type - (again there is a colon : before wq)

Code:
:wq
(enter)

If you want to have 2 ATA's all you have to do is just add your second ATA's password but change the port to 5071. Look at the screenshot below for the example.



Now all you have to do is save and quit (:wq) and reboot. Once the router comes back up just run the top command:

Code:
top
(enter)

You should see mjproxy process running if you have two accounts in the /etc/init.d/mjproxy file then you should see two instances of mjproxy.



*NOTE* If you are running to ATA's behind the same IP I would suggest you don't use the same proxy servers. I have noticed that sometime when an incoming call comes in it might ring on the wrong line or I should say not the intended telephone. What I have seen that works is just use the next closest proxy server.

So you are going to have one ATA point to

192.168.1.1:5070

and the second one to

192.168.1.1:5071

Some of you might have better idea's on how to do what I did and please by all means share with us. I hope this helps someone get their phone up and running (duh) and maybe learn little about Linux.

Have fun!

ScarEye

P.S. I probably made mistakes, if you find any please let me know and I will fix it.


Update 07/15/2009

HOWTO: Access mjproxy outside your home network using OpenWRT /w DDNS setup.

This is a really simple task. But lets make it a little interesting. Most of us have Dynamic IP's assigned to us by our ISP. I know in some cities if you were to reboot your router 5 times in a row you will have 5 different public IP's (Usually DSL Subscribers). This can be a problem if your traveling and your IP changes for whatever reason. Luckily for you, your running OpenWRT !!! Wink

What we are going to do.

1. Install updatedd and updatedd-mod for no-ip
2. Open UDP port 5070 for your ATA to connect to from outside your home network

First, go to www.no-ip.com and register a free DDNS name. In my example I will be using myopenwrt.no-ip.org

Second, log onto your router and type the following.

Code:
opkg update
(enter)

and you see what I have in the screenshot below.



Next, we want to install the DDNS client software with the no-ip mod. Type the following

Code:
opkg install updatedd updatedd-mod-noip
(enter)

Here is the screenshot. Depending on your router this may take 2-5 minutes. Just be patient.



Now all you have to do is just edit the configuration file. Type the following command.

Code:
vi /etc/config/updatedd
(enter)

The following screen should pop-up like in the screenshot below. Just fill in the information you used to sign up with noip.org. Remember to start typing you have to hit the "Insert" key on your keyboard and when you’re done hit the ESC key and type :wq (enter) to write and quit. If you mess up don't worry, just hit the ESC key and type quit! (enter) and it will quit without saving.



Now you can reboot your router or type the following

Code:
/etc/init.d/updatedd start
(enter)

and if you type

Code:
logread


The last line in the log should say something like:

"OpenWrt user.notice syslog: myopenwrt.no-ip.org: updated successfully"

Now from your router you should be able to ping yourddns.no-ip.org and it should give a reply which should be your WAN interface IP.

Now what you can do is update your ATA so that SIP Server IP is yourddns.no-ip.org:5070 instead of 192.168.1.1:5070. After completing the next step you can take your ATA from your home and just bring it with you anywhere plug it into a LAN and start making phone calls. Cool

Opening UDP Port 5070 on your OpenWRT WAN interface.

This is easy. Just do the following.

Code:
vi /etc/config/firewall


Add the following below this line in the firewall config. (look below)

# include a file with users custom iptables rules
config include
option path /etc/firewall.user

Remember to edit hit the "Insert" key and when your done hit the ESC key and type :wq to write and quit. If you screw something up don't worry just hit the ESC key and type quit! And it will quit without saving.

config rule
option src wan
option src_dport 5070
option proto udp
option target ACCEPT

Look at screenshot below.



Now all you have to do is just restart the firewall and you should be good to go.

Code:
/etc/init.d/firewall restart


Test out your ATA outside your local area network and it should be good. I am pretty sure you can even use Fring if you have an iPhone. Smile


Last edited by ScarEye on Wed Jul 22, 2009 10:59 am; edited 7 times in total
Back to top
View user's profile Send private message
Google
AdSense





PostPosted: Mon Jul 13, 2009 9:14 pm    Post subject: Magicjack support, tips, tricks, and hacks

Back to top
richardtaur
Dan isn't smart enough to hire me


Joined: 17 Mar 2008
Posts: 123

PostPosted: Mon Jul 13, 2009 10:12 pm    Post subject: Reply with quote

That is pretty cool. Step-by-step... ^_^ Will put it in my favorite.
Back to top
View user's profile Send private message
pancho1950
MagicJack Contributor


Joined: 07 Mar 2009
Posts: 54

PostPosted: Tue Jul 14, 2009 12:50 pm    Post subject: Reply with quote

ScarEye:

Did everything when I try :wq to save it this is what it said "/etc/init.d/mjproxy" Read-only file system.

Thank's

Pancho1950

Sorry was a typo i did :wq
this the firmware Firmware: DD-WRT v24 (05/20/0Cool voip
Time: 18:54:15 up 30 min, load average: 0.19, 0.16, 0.08
WAN: Disabled


Last edited by pancho1950 on Tue Jul 14, 2009 12:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Tue Jul 14, 2009 12:51 pm    Post subject: Reply with quote

pancho1950 wrote:
ScarEye:

Did everything when I try :wp to save it this is what it said "/etc/init.d/mjproxy" Read-only file system.

Thank's

Pancho1950



it should be :wq <------ W and Q

NOT

W and P

Hope this helps.
Back to top
View user's profile Send private message
pancho1950
MagicJack Contributor


Joined: 07 Mar 2009
Posts: 54

PostPosted: Tue Jul 14, 2009 12:57 pm    Post subject: Reply with quote

ScarEye wrote:
pancho1950 wrote:
ScarEye:

Did everything when I try :wp to save it this is what it said "/etc/init.d/mjproxy" Read-only file system.

Thank's

Pancho1950



it should be :wq <------ W and Q

NOT

W and P

Hope this helps.


Sorry was a typo i did :wq
this the firmware Firmware: DD-WRT v24 (05/20/0 voip
Time: 18:54:15 up 30 min, load average: 0.19, 0.16, 0.08
WAN: Disabled
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Tue Jul 14, 2009 1:07 pm    Post subject: Reply with quote

pancho1950 wrote:
ScarEye wrote:
pancho1950 wrote:
ScarEye:

Did everything when I try :wp to save it this is what it said "/etc/init.d/mjproxy" Read-only file system.

Thank's

Pancho1950



it should be :wq <------ W and Q

NOT

W and P

Hope this helps.


Sorry was a typo i did :wq
this the firmware Firmware: DD-WRT v24 (05/20/0 voip
Time: 18:54:15 up 30 min, load average: 0.19, 0.16, 0.08
WAN: Disabled


This HOWTO: is for OpenWRT I do not run DD-WRT however, you can try
:wq! (enter) see if that works. If that doesn't work you have to log in as root.

type su - (enter) and put in your root password and then try editing the file. or you can try sudo vi /etc/init.d/mjproxy which it should ask you for your root password I don't know if sudo exists on DD-WRT as I don't run it.

Thanks
ScarEye
Back to top
View user's profile Send private message
steve_togo
MagicJack Expert


Joined: 09 Dec 2008
Posts: 84

PostPosted: Tue Jul 14, 2009 10:17 pm    Post subject: Reply with quote

Hi Thank you for the excellent tutorial, I was wondering what ip to give in my ATA if I wanted to access my phone from outside my home n/w. I know I have to open some ports etc., but I am not sure how to do it. Can someone please tell me how i can accomplish that?
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Wed Jul 15, 2009 2:12 am    Post subject: Reply with quote

steve_togo wrote:
Hi Thank you for the excellent tutorial, I was wondering what ip to give in my ATA if I wanted to access my phone from outside my home n/w. I know I have to open some ports etc., but I am not sure how to do it. Can someone please tell me how i can accomplish that?


I have updated the tutorial and it should help you with what your looking for and more ! Smile
Back to top
View user's profile Send private message
steve_togo
MagicJack Expert


Joined: 09 Dec 2008
Posts: 84

PostPosted: Wed Jul 15, 2009 10:13 am    Post subject: Reply with quote

Thank you for the excellent tutorial using open wwrt, I am running dd-wrt and I shall try to see if that is possible with mine
Back to top
View user's profile Send private message
steve_togo
MagicJack Expert


Joined: 09 Dec 2008
Posts: 84

PostPosted: Wed Jul 15, 2009 10:30 am    Post subject: Reply with quote

steve_togo wrote:
Thank you for the excellent tutorial using open wwrt, I am running dd-wrt and I shall try to see if that is possible with mine


Hi Sacreye,

Do you think this will work?>

http://www.no-ip.com/support/guides/routers/dynamic-dns-on-dd-wrt.html

and I cna register for multiple domains so I can have multiple mjs running.
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Wed Jul 15, 2009 11:13 am    Post subject: Reply with quote

steve_togo wrote:
steve_togo wrote:
Thank you for the excellent tutorial using open wwrt, I am running dd-wrt and I shall try to see if that is possible with mine


Hi Sacreye,

Do you think this will work?>

http://www.no-ip.com/support/guides/routers/dynamic-dns-on-dd-wrt.html

and I cna register for multiple domains so I can have multiple mjs running.


It should work, I don't see why not.
Back to top
View user's profile Send private message
steve_togo
MagicJack Expert


Joined: 09 Dec 2008
Posts: 84

PostPosted: Wed Jul 15, 2009 11:19 am    Post subject: Reply with quote

Scareye,

Thankyou for ur response, I am not that knowledgeable in Networking and Unix, Can you please clarify the following questions for me...


1. If I want to register multiple 3 MJ's then do i have to register 3 domains?
2. If i run 3 proxies will I need more space JFFS file system as I have only 376 KB left free?
3. I can attach a USB port to my router do u think I can gain more space in the file system by doing so?
4. What will be the performance if I run multiple MJ's?
5. In the link I posted the author is talking about Port Forwarding on DD-WRT
what will my settings be in that tab?

I have an ASUS WL-520gU, if that helps, I got this router last week specifically for this purpose.

Thank you once again for ur help
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Wed Jul 15, 2009 11:41 am    Post subject: Reply with quote

steve_togo wrote:
Scareye,

Thankyou for ur response, I am not that knowledgeable in Networking and Unix, Can you please clarify the following questions for me...


1. If I want to register multiple 3 MJ's then do i have to register 3 domains?
2. If i run 3 proxies will I need more space JFFS file system as I have only 376 KB left free?
3. I can attach a USB port to my router do u think I can gain more space in the file system by doing so?
4. What will be the performance if I run multiple MJ's?
5. In the link I posted the author is talking about Port Forwarding on DD-WRT
what will my settings be in that tab?

I have an ASUS WL-520gU, if that helps, I got this router last week specifically for this purpose.

Thank you once again for ur help


I am going to answer your questions but this pertains to OpenWRT

1. No, you just need 1 ddns name. On your router you would be running 3 instances of mjproxy on different ports. 5070, 5071, 5072

2. You don't need anymore space. Your just going to run multiple instances of mjproxy on different ports as I stated above.

3. You don't need any USB for extra space. (Not yet at least)

4. I am running 2 at the same time and I have no problems. My CPU is at 0.00% so if you were to add another one I don't think it will make much of a difference.

5. You need to allow UDP port 5070 from the WAN. If you are going to have multiple mjproxy running on other ports then you would need to open up those ports also. ex: 5071 and 5072 (This goes for any routers not just DD-WRT or OpenWRT)

Thanks
Back to top
View user's profile Send private message
steve_togo
MagicJack Expert


Joined: 09 Dec 2008
Posts: 84

PostPosted: Fri Jul 17, 2009 2:53 pm    Post subject: Reply with quote

In the below command

mjproxy 0.0.0.0 5070 proxy01.YOURCITY.talk4free.com 5070 YOURLONGASSPASSWORD

what do the zeroes mean right after mjproxy
Back to top
View user's profile Send private message
ScarEye
MagicJack User


Joined: 09 Jun 2008
Posts: 31

PostPosted: Fri Jul 17, 2009 3:01 pm    Post subject: Reply with quote

I am guessing 0.0.0.0 5070 means any IP's can connect on that port. So, *I think* if you were to change that 192.168.1.20 5070 (LANip) or 25.65.84.12 5070(WANip) then only these particular IP's would be able to connect on port 5070. I can be 100% wrong but this is my guess as of now. Please correct me if I am wrong.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    magicJack and MagicJack Plus Support, Reviews, FAQs and Hacks Forum Index -> magicJack Tips, Tricks, and Hacks All times are GMT - 4 Hours
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB Turbo Extended Edition © 2013, phpBB Group
magicJack and magicJack Plus are trademarks of magicJack LLP. This website is in no way affiliated, endorsed, or sponsored by magicJack LLP, and is an unofficial forum for consumers to openly communicate regarding their experiences with the magicJack products.