Resource icon

TUTORIAL T*F*T*P Setup for Incredible PBX

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,134
Reaction score
2,627
wardmundy submitted a new resource:

T-F-T-P Setup for Incredible PBX - Here are the steps to get T-F-T-P working with Incredible PBX

SETUP

First, make /etc/xinetd.d/tftp look like this for service tftp:
Code:
{
        socket_type            = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args            = -c -s /var/lib/tftpboot -vvv
        disable                = no
        per_source              = 11
        cps                    =...
Read more about this resource...
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Could you dumb this down a bit more for me?
I am running the Raspberry PI Version and trying to configure some Polycom phones.
VoIP.PNG
 

mainenotarynet

Not really a Guru - Just a long time user
Joined
May 29, 2010
Messages
602
Reaction score
74
Location
Bangor, ME USA
How dumb do you need it? just follow the resource and do what it says.

As for configuring polycom phones -- if you can figure out their config files - setting up the tftpboot to work is child's play

follow the instructions to set up the tftpboot and if you have the config files on another computer ready to go, you must make sure each file is made in the t*f*t*p directory you just set up before you try to upload the real one and give it read write execute for Owner, group, and everyone else (chmod 777 filename - for each file) or (chmod 777 -R tftpboot -- to do them all at once) so basically if your polycom config directory has 200 files in it plan to be there for a while doing touch sip_317_phone.xml touch server_317.xml you get he idea

the filename must exist already before you can upload the real one.

Hope this was dumbed enough to get the gist.
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Ummm,... way more dumbed down than that.
I can log in and do things from the command line. i was able to follow the steps of cut and past the commands to load the packages. I even got nmap installed But i an not XXnix proficient by any stretch.


I understand how to use the GUI and the functions of most of it from working with Elastix4 Beta.But Elastix runs it's t*f*t*p server automatically so it found the phones when i plugged them in.


I can't even find a file /etc/xinetd.d/t*f*t*p


It Sounds like this may just simply be over my head.I have spent dozens upon dozens of hours trying to get different packages from this site to work to no avail.
Each seems to fail is some different way. i thought it was the VM I was running on so i tried this for the Raspberry PI, but it too has now failed.
.
i will just have to wait to see if there is an Incredible PBX for Elastix 4 if it is ever released. Maybe i can get that working since i have Elastix 4 working.At least as far as incoming and outgoing calls using Vestalink, but i can't get GV to work on it.
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Also, the link for instructions provided in the error message is currently dead
t*f*t*p Server is not running.
See here for instructions on how to install one: http://wiki.provisioner.net/index.php/t*f*t*p
Provisioner.net has a problem
Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.
(Can't contact the database server: Access denied for user 'mediawiki'@'localhost' (using password: YES) (localhost))
You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.

Provisioner.net WWW​
 

lrosenman

Guru
Joined
Oct 17, 2014
Messages
222
Reaction score
30
Location
Austin, TX US
what I did on my pi:
apt-get install openbsd-inetd
apt-get install tftpd

edit /etc/inetd.conf and make the sure the t*f*t*p line looks like:
Code:
#:BOOT: t*f*t*p service is provided primarily for booting.  Most sites
#      run this only on machines acting as "boot servers."
t*f*t*p            dgram  udp    wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /tftpboot
and then service openbsd-inetd start

now t*f*t*p will work and serve files from /tftpboot
 
  • Like
Reactions: ostridge

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Irosenman: Thank you for the detailed instructions.
I have followed your instructions and everything seemed to work.
but i still am having no luck.

Installation:
A.PNG

Editing inetd.conf, Before:
B.PNG

Editing inetd.conf, After:
C.PNG

Starting:
D.PNG


the bootfile exists, and is updated if i add a phone by MAC :
E.PNG

But it doesn't register the phones. Or find the others out on my network when i search.

Port 69 is not open per Nmap
g.PNG




Any thoughts?
Thanks,
 

lrosenman

Guru
Joined
Oct 17, 2014
Messages
222
Reaction score
30
Location
Austin, TX US
t*f*t*p is UDP.

Code:
[email protected]:~ $ netstat -an|grep 69
tcp        0      0 127.0.0.1:3306          127.0.0.1:51769         TIME_WAIT
udp        0      0 0.0.0.0:4569            0.0.0.0:*
udp        0      0 0.0.0.0:69              0.0.0.0:*
unix  2      [ ]         DGRAM                    7692     /var/run/thd.socket
unix  2      [ ACC ]     STREAM     LISTENING     7696     /var/run/dhcpcd.sock
unix  2      [ ACC ]     STREAM     LISTENING     7698     /var/run/dhcpcd.unpriv.sock
unix  3      [ ]         STREAM     CONNECTED     6914
unix  3      [ ]         STREAM     CONNECTED     6695     /var/run/dbus/system_bus_socket
unix  2      [ ]         DGRAM                    6697
unix  3      [ ]         STREAM     CONNECTED     7969
WARNING: Always run Incredible PBX VM behind a secure hardware-based firewall.
[email protected]:~ $
what's the permissions on ALL the files (and the directory) /tftpboot?
(ls -la /tftpboot)
AND, does your ROUTER give out THAT server as the t*f*t*p server address with DHCP?
my ROUTER (ASUS RT-AC68U, using the merlin ASUSWRT sw) DOES, I added the following to it's config
Code:
[email protected]:/jffs/configs# cat dnsmasq.conf.add
dhcp-option=lan,66,192.168.200.91
dhcp-option=lan,128,192.168.200.91
dhcp-option=lan,150,192.168.200.91
[email protected]:/jffs/configs#
192.168.200.91 is my IPBX server.
 
  • Like
Reactions: ostridge

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Here is what i see:
1new.PNG

I use a SOPHOS UTM Firewall for routing.
I do have OPT 66 set to my VOIP server.
I do NOT have OPT 128 or 150 set.
I will try that in the AM
I also have the phones programmed to look for the T*F*T*P server at the IP of my VoIP Server
 

lrosenman

Guru
Joined
Oct 17, 2014
Messages
222
Reaction score
30
Location
Austin, TX US
Ok, do you see any entries from tftpd in /var/log/syslog?
Code:
WARNING: Always run Incredible PBX VM behind a secure hardware-based firewall.
roo[email protected]:/var/log $ grep tftpd /var/log/syslog
Sep 15 21:59:43 incrediblepbx in.tftpd[30581]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 21:59:43 incrediblepbx tftpd[30582]: tftpd: trying to get file: CTLSEP00120052FCDF.tlv
Sep 15 21:59:43 incrediblepbx tftpd[30582]: tftpd: serving file from /tftpboot
Sep 15 21:59:43 incrediblepbx in.tftpd[30583]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 21:59:43 incrediblepbx tftpd[30584]: tftpd: trying to get file: SEP00120052FCDF.cnf.xml
Sep 15 21:59:43 incrediblepbx tftpd[30584]: tftpd: serving file from /tftpboot
Sep 15 21:59:44 incrediblepbx in.tftpd[30585]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 21:59:44 incrediblepbx tftpd[30586]: tftpd: trying to get file: P0S3-8-12-00.loads
Sep 15 21:59:44 incrediblepbx tftpd[30586]: tftpd: serving file from /tftpboot
Sep 15 22:00:02 incrediblepbx in.tftpd[30617]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 22:00:02 incrediblepbx tftpd[30618]: tftpd: trying to get file: SIPDefault.cnf
Sep 15 22:00:02 incrediblepbx tftpd[30618]: tftpd: serving file from /tftpboot
Sep 15 22:00:02 incrediblepbx in.tftpd[30619]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 22:00:02 incrediblepbx tftpd[30620]: tftpd: trying to get file: ./SIP00120052FCDF.cnf
Sep 15 22:00:02 incrediblepbx tftpd[30620]: tftpd: serving file from /tftpboot
Sep 15 22:00:09 incrediblepbx in.tftpd[30651]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 22:00:09 incrediblepbx tftpd[30652]: tftpd: trying to get file: RINGLIST.DAT
Sep 15 22:00:09 incrediblepbx tftpd[30652]: tftpd: serving file from /tftpboot
Sep 15 22:00:09 incrediblepbx in.tftpd[30653]: connect from 192.168.200.169 (192.168.200.169)
Sep 15 22:00:09 incrediblepbx tftpd[30654]: tftpd: trying to get file: dialplan.xml
Sep 15 22:00:09 incrediblepbx tftpd[30654]: tftpd: serving file from /tftpboot
WARNING: Always run Incredible PBX VM behind a secure hardware-based firewall.
[email protected]:/var/log $
the above is from rebooting my Cisco Phone.
Also, did fail2ban blacklist your phone(s) IP's?
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
It appears not. i rebooted the 2 phones i have defined with no result
var.PNG

I have not worked with fail2ban. i will look into it.

The changes to the router didn't help either
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
in the Linux firewall i see drops for the other phones in my system that it should be detecting automatically in endpoint manager
firewall.PNG

ok, I have the IPtables set up, now looking up how to reset fail2ban
 

lrosenman

Guru
Joined
Oct 17, 2014
Messages
222
Reaction score
30
Location
Austin, TX US
grep seems to think your /var/log/syslog file is BINARY -- and it DOES have tftpd entries (note the binary file /var/log/syslog matches).

you might want to bring it up in an editor.

Also, once you got rid of the drop rules, are things better now?
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
It still did not help. But i am starting over from scratch so i have a clean image to work with now that i know the steps. i may have messed something up on the other one poking around trying stuff.. Thank you for the help and i will report back after the reload
 

tinker3433

New Member
Joined
Aug 21, 2015
Messages
13
Reaction score
1
Success!!! (partial)
I have a Polycom 601 registered, displaying the correct extensions, and calling out on GV & vestalink.
I cannot get the Polycom 330s working yet.But now i know all the foundations are working and it is just tweaking it now.
I have a 330 registered and working now also now also !!!

The "scan for phones" is not working, but that is just a luxury.

Thank you Irosenman for the t*f*t*p setup instructions and guidance.
And thank you to Ward and all the others that have created this excellent Incredible resource.
 

pjmsullivan

New Member
Joined
Dec 31, 2014
Messages
1
Reaction score
1
lrosenman: first, thank you for the info!
wardmundy - you are the man.

I was having a similar issue as tinker3433. Seemingly, my t*f*t*p server was running as there were log entries. However, the server was not sending data. I think this was because of the preceding forward slash before the name (i.e. "/spae02f6d61e2f7.xml" rather than "spae02f6d61e2f7.xml")?


Code:
Oct 14 02:15:03 pi2 tftpd[5998]: tftpd: trying to get file: /spae02f6d61e2f7.xml
Oct 14 02:15:03 pi2 in.tftpd[5999]: connect from 192.168.3.13 (192.168.3.13)
Oct 14 02:15:03 pi2 tftpd[6000]: tftpd: trying to get file: /spae02f6d61e2f7.xml
Oct 14 02:17:16 pi2 in.tftpd[6169]: connect from 192.168.3.13 (192.168.3.13)
Oct 14 02:17:16 pi2 tftpd[6170]: tftpd: trying to get file: /spae02f6d61e2f7.xml
Oct 14 02:17:16 pi2 in.tftpd[6171]: connect from 192.168.3.13 (192.168.3.13)
Oct 14 02:17:16 pi2 tftpd[6172]: tftpd: trying to get file: /spae02f6d61e2f7.xml
Oct 14 02:17:16 pi2 in.tftpd[6173]: connect from 192.168.3.13 (192.168.3.13)
Oct 14 02:17:16 pi2 tftpd[6174]: tftpd: trying to get file: /spae02f6d61e2f7.xml
I resolved this issue by "apt-get remove openbsd-inetd" then "apt-get install tftpd-hpa" (tftpd was already installed). I'm not sure if tftpd-hpa logs anywhere by default (without more verbosity).

I modified /etc/default/tftpd-hpa as follows:
Code:
RUN_DAEMON="yes"
OPTIONS="-l -s /tftpboot"
TFTP_USERNAME="t*f*t*p"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--ipv4 --secure"
Per instructions here: http://pbxinaflash.com/community/index.php?threads/t-f-t-p-server-for-incredible-pi.15260/
Then I restarted the service: "service tftpd-hpa restart"
Not sure if this makes a difference, but earlier I "chmod -R 777 /tftpboot/"
Hopes this helps someone with their rasperry pi. As it is, neither nmap nor t*f*t*p are functioning on initial install and OSS Endpoint manager does not work. I don't think that "search devices" works.
Long night; bed time.
 
  • Like
Reactions: wardmundy

ksDevGuy

Guru
Joined
Oct 18, 2007
Messages
102
Reaction score
11
In case it helps anyone, with the current Incredible PBX release (Dec 2015) we were only able to get t*f*t*p services operating correctly by changing the config to point to the "/tftpboot" folder - then everything worked precisely as Ward's How To documents.
 

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,364
Messages
137,345
Members
14,574
Latest member
ipv6freely