Howdy!

I never did this so take my thinking with a grain of salt.

However, if I was going to implement such functionality, I'd have PHP do the authentication and then spawn iperf from my PHP page on some random non-default non-privileged port. This PHP script would then return information about server IP and port to client - either using a redirection with code 307 or returning this info as plain text result (code 200), depending on client needs. This would bring additional benefit on being able to offer iperf service on different physical servers according to client state (IP, user, ...).

In order to protect server from being used by non-authorized users later on, I'd implement some sort of time-limit on server life (e.g. PHP would start some shell or other script which would start iperf in server mode and then waiting for certain time after which it would kill the iperf server).

Peace!
  Mkx

-- perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
-- echo 16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlb xq | dc

Pravni pogoji / Legal disclaimer

------------------------------------------------------------------------------

BOFH excuse #132:

SCSI Chain overterminated



m...@grounded.net wrote on 16/11/14 17:17:
I forgot to mention that I don't know the IP's of the remotes, they will change 
all the time.
However, they do use curl to authenticate to php so have been looking for a way 
to cobble something together.

I could have php quickly add the IP of the remote to iptables, reload once it 
is authenticated but since there would be many remotes connecting at any given 
time, that seems like an accident waiting to happen.

I also wondered if there is a way that php might be able to control the iperf 
port or service but that seems to be a dead end.

I then wondered if there might be a fork of iperf which might allow me to do 
this but I've not found anything yet.

----- Original Message -----
From: "Sandro Bureca" <sbur...@gmail.com>
To: m...@grounded.net
Sent: Sunday, November 16, 2014 6:21:29 AM
Subject: Re: [Iperf-users] protecting iperf behind public server


You can use iptables on the machine acting as iper sever if this solution is
applicable and apply filter on source ip address and the standarf iperf port 
5001 or any other at your choice



On 16 November 2014 00:39, m...@grounded.net < m...@grounded.net > wrote:


I have a number of logging devices which connect home over the internet. Each 
device calls home using curl, authenticating part htpasswd then onto a php app.

I wanted to add iperf as a test to know where there are bandwidth issues but I 
need to protect iperf to allow only my own devices to use the server and iperf 
running as a daemon/service.

Was wondering if anyone in this list might have to thoughts on how this could 
be done, so that I could retain my htpasswd/php authentication and perhaps even 
use that.

Might there be a way of having php allow the iperf connection perhaps?

Thanks kindly.

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users

Reply via email to