I still have that rule and the ssh server is working (the ftp server isn't active).
In my pc, I also have that rule and the ftp/ssh servers are working.
Printable View
Then I can only guess that something about my Internet connection makes those packages come in as INVALID for some reason.
OK, so it's good to know that Oleg's INVALID rules are good and removing them is only a particular workaround, not a generally good advice.
Cant get the password to work.. :/
Log says:
2007-09-13 17:54:28: (http_auth.c.964) digest: unsupported backend (only htdigest or plain)
Should I change the auth.backend.plain.userfile to auth.backend.htdigest.userfile and then put that /opt/etc/lighttpd/.passwd inside "" ?
I tried both, neither work :&
Look for a line saying this:
auth.backend = "htdigest"
I'm thinking perhaps you put "digest" in there. You're not supposed to put it there, "digest" goes below where it says "method" => "digest".
It's how you said..
It still doesen't work
Hmm.. Should I uncomment all those that were edited?
I have done that..
Now it says "Bad Request" :(
Could someone send me those config files, cause I cant find any problems from there, they seem fine.
my paths are:
/opt/etc/transmission-ssl.conf
/opt/etc/lighttpd
/opt/etc/lighttpd/.passwd
and btw. I changed the lighttpd to start from post-mount..
When I comment the auth parts, ssl works fine, but when I uncomment the auth shit and make user and password, it says bad request..
And I tested user 1 and password 1 but still it says 400 - bad request..
Maybe I just should use the ssl and deny access from outerweb.. :/
Hi wirespot,
I have followed your tut to hack Wondershaper but I ran into some problems.
First of all making changes to /sbin/wshaper is impossible, so I made a copy in /usr/local/sbin and modified it here and running it from post-firewall. Is this ok?
The second problem I have noticed were this warning when I was trying to start wshaper manually:
When browsing the code I have noticed there is a missing u before the filter "32". When I add it everything seems to run ok. Do you have a typo in your code or am I doing something wrong?Code:wshaper start eth1 400 190 "" "" "" "" "20 21 22 25 110 143 80 443 587 995"
Unknown filter "32", hence option "match" is unparsable
Thx
Yes, making a copy and running it from post-firewall is the accepted practice. Here's how I currently do mine:
This will test if my version of wshaper exists and is an executable. If it is, it will call it and pass the ports as well. If not, it will call the original wshaper and pass just the speeds.Code:SPEEDS="2980 500"
PORTS="20 21 22 25 110 143 80 443 587 995 5050 1863 5222 6667"
[ -x /opt/app/local/bin/wshaper ] && \
/opt/app/local/bin/wshaper start $1 $SPEEDS "" "" "" "" "$PORTS" || \
/sbin/wshaper start $1 $SPEEDS
Of course, you should use speed values as appropriate for your connection. The ports are my own choices and you may find them useful: from left to right, we have FTP, SSH, SMTP, POP3, IMAP, HTTP, HTTPS, secure POP3 and SMTP, a few messenger transfer ports and finally IRC DCC.
As for the "u32" yes, it should have an u there. Mine does, I have no idea why it turned up missing it on the forum.
Dear Wirespot,
Using your instructions I think I managed to get wshaper to work. HOwever, I would like to use FTP, next to torrent traffic. The FTP traffic I want to use to transport files to other locations, and I want the download of my server to be of a reasonable speed, so this should not be low priority. COuld you explain to me what parameter I have to change in order to achieve this? At the moment my browsing and email traffic works great while downloading a torrent, but accessing the router from elsewhere by FTP is very slow. How can I put FTP traffic in the High priority class?
Thanks in advance,
Ecori:o
Ports 20 and 21 are FTP. They're already in the instructions I gave so they should work. Unless you're trying to upload or download stuff directly on the router. This wondershaper stuff only works for traffic done from the computers in the LAN behind the router.
Hi Wirespot,
Thanks for your reply, indeed on my lan the wondershaper works great, but I would like to access it from the internet, if I am at my work to get to my files on the FTP drive. Is this possible at a reasonable speed while a torrent is downloading?
Thanks!:)
Best regards,
Ecori
I'm not sure. Traffic shaping on Linux has some quirks in that it can shape things that go out of the router, but not things that come in. In your case, you want to shape traffic between the router and the Internet. FTP traffic from the router to the outside (your workplace) could be shaped, but BT... not so much. BT traffic is at least 50% download (from Internet to router) and in most cases more than 50%. That percentage cannot be shaped.
I repeat, this is a particular case: FTP vs BT traffic, both between the router and Internet. If it was traffic from the Internet to the LAN via the router you'd be able to do it. So the only choice is to stop or limit BT traffic whenever you need to transfer via FTP.
Also, please remember that you're probably going to be limited by both your home connection upload speed limit from your ISP. And if you use files on the USB drive, the router has this problem where it can't go over a certain speed (1.5-3 MB/sec) when transferring to/from the USB drive.
Hi Ecori,
There's another approach to accomplish this.
I've had problems with transfer speeds (on lan) when the asus was heavily downloading from newsgroups. (HellaNZB).
Response and speed where very bad.
So I thought about priority settings. like giving samba (and ftp in your case) higher priorities over the downloader (HellaNZB, in your case the torrent downloader).
This can be accomplished with the use of nice. (I've had to ask other forum members on how to do this, but here's the link: http://www.wl500g.info/showthread.php?t=12189 )
Now, downloading from newsgroups is not affected unless I use samba or ftp for transfering data. Because they have higher priorities than the downloader they tend to work better, so while downloading, the response and speed is really good. The speed of the downloader drops about 80-90% (from 600-700kbyte/sec to 60-90 kbyte/sec) in the background, but speeds are resumed once you're ready transferring through samba or ftp.
So this is exactly like I wanted it to be.
transfering speeds using wired lan
samba: 3.2 - 3.5 mbyte/s
vsftpd: 3.8 - 4.0 mbyte/s
http://dhost.info/raas/speed.gif
Also bear in mind when you're at work and want to download files.:
Your upload speed of your internet connection. Unless you're on fiber or something else I bet the transfer speed of your asus is faster than your uplink (for which in fact you need about 50mbit/s upstream).
HTH
Thanks alot Wirespot and Raas, I will try the nice method, and see if this wil work for my purpose. I realize that the upload speed is mainly dependent on the internet connection. Without torrents I was able to download from my ftp server with 100 kbs, but that dropped to 5 kbps when torrents were active. Thus using torrents made it almost impossible to use the ftp server for collecting files. Thanks for the info, I will studie the nice method, getting closer to the router config I really want!:)
Have a nice weekend,
Ecori
PS Raas, where do you know where I can find the file I have to edit for using the ftp program. I am using the FTP server standard present in Oleg's firmware. I cannot find the file where this is started.....
Raas, thanks for your answer. In the mean time I found this thread on the forum: http://wl500g.info/showthread.php?t=758
I have added to the post-boot file:
killall stupid-ftpd
sleep 2s
/opt/bin/nice -n-5 /usr/sbin/stupid-ftpd -f /tmp/local/stupid-ftpd.conf
The ftp server is up and running, I don't know if the speed has improved (still need to test it...)
Thanks,
Ecori
I used your tutorial, and ssl works fine, but only ssl. When I point browser to http://myrouterip it displays blank page.
In lighttpd error.log i see:
Is there any solution to use both http and https protocols?Code:2008-05-06 13:37:19: (connections.c.279) SSL: 1 error:1407609C:SSL routines:SSL23_GET_CLIENT_HELLO:http request
That's what I also wanted to do.Quote:
Is there any solution to use both http and https protocols?
But I haven't found anything.
Seems that lighttpd is running in http OR in https mode, not both.
AFAIK, lighttpd doesn't have "true" virtual host features ie. the same instance is not able to serve several websites simultaneously, with completely different configurations.
It has limited vhost functionality (see module evhost) which means it can map a subdomain to a certain path automatically. So you can for instance map user.domain.com to /home/user/public_html. But that's as far as it goes. It's more of a root directory hack, really.
So to answer your problem, just run one lighttpd instance for each configuration. Here's what I did:
* I've made several .conf files under /opt/etc/lighttpd by copying the original (lighttpd.conf). For instance, I have internal.conf which sets up a LAN website where I can see my rrdtool graphs, and I have external.conf which sets up a public website (with SSL and user+password) for my friends.
* Under /opt/etc/init.d/ I've copied S80lighttpd to S80lighttpd-internal and S80lighttpd-external. I've edited each of them and changed DAEMON_OPTS to reflect the appropiate .conf file as described above.
* Normally, these S80 files should start automatically at reboot. In case they don't, edit your /usr/local/sbin/post-boot and add each of them somewhere, like this:
It's up to you how many different .conf files you set up and how you customize them. Just remember to make them in pairs (each .conf under /opt/etc/lighttpd needs to have a /opt/etc/init.d/S80... file that uses it).Code:/opt/etc/init.d/S80lighttpd-internal start
Oh, and make sure not to have two conf files trying to use the same host+port combination ie. server.port and server.bind in the configuration must be a different combination. You can't have two servers listening on the same interface AND the same port, but you can have them listen on different interfaces and the same port or different ports and the same interface.
I'm using such piece of the config to enable 2 separate roots --- secure and insecure:
PHP Code:server.document-root = "/opt/home/www/lighttpd"
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/opt/var/run/lighttpd.pem"
server.document-root = "/opt/home/www/secure"
auth.require = ( "" =>
(
"method" => "digest",
"realm" => "VU",
"require" => "valid-user"
)
)
}
ok.. nice... going to try this tonight.
Thank you !
I used @al37919 method, and it works like a charm! :)
Thanks!
It's very nice, I didn't know you could do that.
You can still use different config files if you want to run one of the servers only occasionally. Especially on the outside interface, you may not wish to have it available all the time (even if it has SSL and password, the most secure way is for it not to run at all.)
It is enough just not to open port 443 in the firewall ;)
Yeah, but where security is concerned it's really bad practice to rely on the firewall for something that the service itself can do (not be available when you don't want it to). You can't hack what is not there. With a firewall, it's there, just cloaked. Are you 100% confident in your iptables skills, for example, to absolutely guarantee you haven't missed a way to allow access to your server? Firewalls are more of a last resort in security, there's no substitute for the applications themselves doing the right thing. Rant over. :)
Yes, you need to install a few other packages along with streamripper (audio codecs): libmad, faad2, libogg, libvorbis. Do "ipkg install" for each of them.
I wonder why they weren't marked as required by the streamripper package. It's obvious that streamripper won't work without them -- the binary appears to be linked with all four and needs them in order to run.
For anyone wondering I got a list of the extensions that were installed by the stock php setup.
Note that pdo_sqlite.so is for the newer SQLite 3 and sqlite.so is for SQLite 2. You can load both but you really only need pdo.so and pdo_sqlite.so enabled for sqlite support to work.Code:bcmath.so
bz2.so
calendar.so
curl.so
dba.so
dom.so
exif.so
ftp.so
gd.so
openssl.so
pdo.so
pdo_sqlite.so
shmop.so
sockets.so
sqlite.so
sysvmsg.so
sysvsem.so
sysvshm.so
xml.so
xmlreader.so
xsl.so
zlib.so
I tried to setup SSL + User/Pass
It all works fine untill I need to have htdigest, downloaded the package apache by ipkg download apache, found the htdigest, but when I want to use it, i obtain:
[admin@kolibrieroutert tmp]$ htdigest -c /opt/etc/lighttpd/.passwd facturen robert
-sh: htdigest: not found
with command ls
[admin@kolibrieroutert tmp]$ ls
apache_2.2.8-1_mipsel.ipk htdigest
what do I do wrong
[admin@kolibrieroutert tmp]$ ./htdigest -c /opt/etc/lighttpd/.passwd facturen Robert
./htdigest: can't load library 'libuuid.so.1'
[admin@kolibrieroutert tmp]$
Now I am feeling soooo stupid!
I have installed the package apr-utils and found on ubuntu forums to install a certain e2fsprogs package to install...did both, still got this message
hey I want to metion a bug on the wonder shaper.
if you are using the command in putty, you should use eth1 instead of vlan1.
also, it somehow doesnt allow download speeds bigger than 8mbit:(
when uploading I have now a ping of 40 instead of 300, that is good for gaming:)Quote:
/sbin/wshaper start eth1 8000 900
however, I have an internet package with 24mbit!
so when I set it to 8mbit in wshaper I get only 500kb/s maximum...
without the shaper I get more than 2mb/s:rolleyes:
when I change the value higher than 8mbit I get lower speeds, sometimes even 100kb/s:mad:
do you know any work-around?:confused:
@SeverusSneep: I'm not sure what's going on there on your router. For me, installing apr-util took care of it, now htdigest works as expected.
@wpte: It's possible that the CPU on the Asus can't handle that many packets. I can't help you much there, I've never used lines of over 4 Mbits so I can't say what the problem might be.
Solved the problem with apr-util. Apparently one or two packages could not be found, so installed them manually. Got the htdigest working.
But...(yes, I know! Don't shoot me)
I added user Robert (my colleague) to the list with trusted users (.passwd file), I got him in the correct realm (facturen) and inserted the correct information.
When I xs the interface at https://192.168.1.33:8081/folder I see an user/pass field, when I fill in the (with htdigest) inserted combinations of user/pass (Robert/deleeuw) this combination won't be accepted.Code:#### auth module
## read authentication.txt for more info
auth.backend = "htdigest"
auth.backend.plain.userfile = "/opt/etc/lighttpd/.passwd"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
auth.backend.ldap.filter = "(uid=$)"
auth.require = ( "/" =>
(
"method" => "digest",
"realm" => "Facturen",
"require" => "valid-user"
),
)
My commands with htdigest
When I open the .passwd file I see:Code:[admin@Kolibrieroutert tmp]$ ./htdigest /opt/etc/lighttpd/.passwd Facturen Robert
Changing password for user Robert in realm Facturen
New password:
Re-type new password:
[admin@Kolibrieroutert tmp]$
So the generation of the user/pass went correct...but it still won't work...everything else works like a charm!!!Code:Robert:Facturen:2732a9acf2e70597dddcb6aa3e5dbe41
My special thanks to you all for your help
No problem, you've fallen for a rather classic mistake. If you're setting up authentication backend as "htdigest" (auth.backend) then you have to use config directives with "htdigest" in them. You used "plain". So the correct line is:
The way you did it, lighttpd couldn't find a passwd file for the htdigest backend so obviously it wouldn't allow access.Code:auth.backend.htdigest.userfile = "/opt/etc/lighttpd/.passwd"
In the future, set up an error log file (server.errorlog = "/opt/var/log/lighttpd/error.log") and make sure /opt/var/log/lighttpd exists and is owned by the user and group the server runs as (see server.username and server.groupname). And when you have problems you just peek into that file and it will tell you what went wrong. If you had it ready now you would have most likely seen something like "can't find the htdigest passwd file" in there.
I tried out a newer version of wshaper 1.1a
this version differs from the original one on the router
however, there is a problem, it keeps saying me to read the readme first... while I did:mad:
anyway... the cpu doesnt seem to respond to wondershaper, it's not even a process;)
/sbin/wshaper start eth1 -1 900
this code works quite well... however, still no bigger speeds than 8mbit with download:(
the downloading is more stable tough:)
Thank you for your answer, I didn't have the time to try, but it must work :)
I'm having some troubles with slow download speed using transmission on my wl-500gP v2, I must admit that all this is new for me (meaning linux and stuf), and an error from me it's possible, but i think is an transmission error.
Can you help me with some sugestions?
Thank you
Hi to everyone!
As I tried to set up torrentflux, everything went well, untill this part:
torrentflux-b4rt 1.0-beta2 - Setup
Database - Create Tables
The installation will now attempt to create the database tables required for running torrentflux-b4rt.
Error: Cannot connect to database.
what could I do to finish this set up?
thx
btw: I'm a dummie when it comes to linux:eek: