Forward port 5060 in Fritz to asterisk, how ?

mihaicph

Neuer User
Mitglied seit
3 Okt 2010
Beiträge
9
Punkte für Reaktionen
0
Punkte
0
Hi,
I have a Asterisk server behind the Fritz 7270 and i need to forward port 5060 to that server. How can i change the Fritz to not complain about that port (i guess it's because it' internally in use). One way could be to change the Fritz internal port away from 5060. I really don't want to change the asterisk default port from 5060.

mihaicph
 
Hi mihaicph

You suffer two issues. First, 5060 is in use by the box itself. Second, portforwarding is not allowed to the box's own address in the webif.

Both can be settled by some changes to the configuration files in /var/flash. Performing a google search for "portforwarding ar7.cfg" will give you an idea.
The SIP port is located in voip.cfg and can be altered there.
Reboot your box to apply the changes, or do a voipcfgchanged, or ar7cfgchanged respectively.

Btw., Freetz includes a frontend to easily change the firewall settings, such as portforwarding.
 
Hi,
Thx for the quick reply.

I am not sure why you say i have two issues. I only see one and that is that i can't forward the 5060 from WAN to internal network. Maybe i am misunderstanding your post ?

I tried doing a Google search unfortunately all post i find are in German :confused::confused:

Do you have some link in English ?

mihaicph
 
Let's call it one problem with two reasons :cool:

First is to change the box's SIP port in voip.cfg.

Second is to set up the portforwarding in ar7.cfg. Scroll for the forwardrules section and insert this line
"upd 0.0.0.0:5060 0.0.0.0:5060 0",
Note the ; only in the last line, each other has to have a tailing ,

I've never done that myself, because I used Freetz's firewall CGI addon, but I hope I got that right. Worst case your box will stop responding, so make sure you are prepared to do a recover.

In earlier firmwares one was able to set up virtual interfaces, such as eth0:1, which could have their own ip address. But since .80 this doesn't seem to work.
 
Ok so i need SSH access to the Fritz box right ? I need to enable it by using a phone or something like that right ?

Can i just change the default port and then use the UI to do port forwarding ?
 
Telnet will do, SSH needs further software on the box.

#96*7* enable telnet
#96*8* disable telnet

That was the second issue I mentioned, the webif doesn't allow portforwarding to the box's own ip-address, irrespective the port is in use or not.
 
thx for the SSH trick.

Ok but i still don't get it :confused::confused:

What i need is WAN (TCP 5060) -> 192.168.1.X (5060) the ip 192.168.1.X is not the Fritz ip si why won't the fritz let me ? Is it because it's the WAN i am refering to or ?
 
Oh what a shame :oops:

Don't know why but I overread the "behind" and always thought of asterisk-on-fbf. Sorry for the confusion, then you can of course set up the portforwarding in the webif.
 
No problem at all :)

I still need to change the port on the fritz before being able to do nat because otherwise fritz will cannibalize the wan port 5060. Right?
 
Yes, that's condition. But SIP by default is UDP, not TCP. And don't forget to forward your RTP Ports.
 
Good i will enable telnet, change voip.cfg and i will need to figure out how to save the voip.cfg after change. Yes RTP will ofcourse need to be forwarded as well. I will forward TCP/UDP 5060 to my Asterisk because i would like to try TCP transport as well.

Thank you for all your help.

/mihaicph
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.