Debian Configuration :: Torrent Traffic Very Slow / Make It Up?
Jul 10, 2011
I am running on debian squeeze 6.0.2. I have been using it for the last id say 3 weeks and really am enjoying it.
I generally use transmission-gtk to share files over the internet. Normally I seed torrents at 110-160kb/s for hours at a time. However after messing around with firestarter my upload speed for seeding torrents rarely peaks over 70kb/s. I have purged firestarter with no success of my regular upload speed, and am very confused as to what happened. I also notice sometimes when it will get to about 70kb/s it will immediately drop down to the 20-30kb/s range.
For incoming bittorrent connections I use port 37294. I have set port 37294 to be allowed in my firewall, and forwarded in my router (since purging firestarter did not help I just reinstalled it).
I have also read allowing ports 6881-6889 is important, but I have never done that in my history of using torrents, and I have never experienced a decrease in UL speed like this.
Have I done something incorrect? I have never had this issue on other machines?
I am running Fedora 9 and KDE 4.2.1. I want to set up some traffic shaping on my machine to prevent my torrent client from hogging my entire bandwidth. I.e., I want KTorrent to download and upload to the best of its ability, but still be able to browse the net freely in spite of the torrents. I have done some reading about traffic shaping in Linux. There is lots of material about it, but most of it (such as the lartc.org "howto") is very complex and comprehensive and looks extremely intimidating. Furthermore, most of it addresses situations where you want to distribute traffic between multiple computers in a network. I just want to manage processes on a single machine. I am hoping for a piece of software that lets me assign each a "priority" to each application, or something like that. Like cFosSpeed for Windows.
I have a question regarding Traffic Shaping in Linux, Suppose I have a server on the internet (web, email or ftp) and I want to shape outgoing traffic per IP, say 256k for each destination IP. I've seen examples on the internet on how to shape traffic per IP by adding a queue for each IP, and some examples by using u32 hash if I have e.g. a /24 network, but if I have a server and I want to shape the traffic by destination IP, and of course... since it is a server on the internet I can't manually define any IPs of subnets. An example using the tc command?
I'm running OpenVPN service on both debian server and client. When start connection between client and server, I expect all the computer traffic (except ARP and DHCP requests) go through created tunnel. However, when I capture packets on wlan0 on client (the only connection going outside host) using Wireshark, I can see DNS requests visible and sometimes incoming TCP traffic as well, but most of the traffic is going through tunnel as expected. I provide both configurations of client and server and client routing table for inspection. I changed server address to avoid server exploitation in the case of some big configuration mistake.
Commands to run OpenVPN services are: Code: Select allFor client: sudo openvpn --config /etc/openvpn/client.conf & For server: sudo openvpn --config /etc/openvpn/server.conf &
**Client routing table when VPN is OFF** Code: Select allKernel IP routing table Destination   Gateway     Genmask     Flags Metric Ref  Use Iface default     192.168.1.1   0.0.0.0     UG  1024  0    0 wlan0 192.168.1.0   *        255.255.255.0  U   0   0    0 wlan0
[code]...
I searched through many forums and documentation and I found, that for all the traffic going via VPN is command: *push "redirect-gateway def1"* neccessary, however, I have leaks despite this command being in place. I already spent over 2 days with this and tried to configure it in many ways, now I have no clue what I'm missing.
I need to be able to do the following: Physical Router located at 192.168.40.1 On Ubuntu 10.04 Lucid machine:
eth0 with static ip 192.168.40.2 eth1 with static ip 192.168.40.3 eth2 with static ip 192.168.40.4
Associate a virtual address to eth1 with an entirely different network address such as 192.168.50.1 Do the same (virtual address) for eth2 -- e.g. 192.168.60.1 In the application:
register phone number A at 192.168.40.1 (The application will automatically use eth0 for this) register phone number B at 192.168.50.1 register phone number C at 192.168.60.1
Somehow forward all traffic (including the register request) sent to 192.168.50.1 to 192.168.40.1 as if the register had been made directly to 192.168.40.1. In other words, the app "sends" registration and traffic to 192.168.50.1 but then Ubuntu forwards it to 192.168.40.1 (but the app does not know that). Similarly, forward all traffic sent to 192.168.60.1 to the router at 192.168.40.1.
Do the same for the reverse, forward all traffic that the router sends back to 192.168.40.3 (eth1) to 192.168.50.1 (within the Ubuntu machine) so that the app knows it is for phone B. Similarly forward all traffic that the router sends back to 192.168.40.4 (eth2) to 192.168.60.1 so that the app knows it is for phone C. Thus, the application believes that it is registering at 3 completely separate routers on 3 completely separate networks via 3 separate network interfaces but in fact is really registering all three to the same router (but does not know that). Similarly, the router believes that it is receiving 3 separate registrations because it receives each registration request and traffic from 3 separate interfaces and thus 3 separate mac addresses (i.e., of eth0, eth1, and eth2). Traffic sent to and from the router for each of the 3 phone numbers (via eth0, eth1, and eth2) are not mixed because the translation happens in both directions.
I installed the PPTP Client [URL] and can successfully connect to my VPN (creates interface ppp0). The problem is, I'm trying to tunnel all of my traffic on my system through the connection. I've seen conflicting howtos and scripts including pptpclient's documentation (the ip-up and ip-down scripts don't work). How does one simply (even if I type it manually) tunnel the traffic?
System Info: OS: Debian Squeeze, Kernel 2.6.32-5-686 GUI: Gnome (standard one from netisnt unstable install) Main interface: eth1 PPTP interface: ppp0
I have a laptop connected to internet via wlan0. I also have eth0 interface and with it I share internet. I want to modify/filter all the traffic passing by the first laptop, something like this:
Code: Select all          *---------------------------*           |    LAPTOP 1      |   *--------------* ?           |-----*  *------*  *----*   |       |   INTERNET<------>|wlan0|<-->|MY_APP|<-->|eth0|<---->|ANOTHER LAPTOP|           |-----*  *------*  *----|   |       |           *---------------------------*   *--------------*
I know that in FreeBSD it is possible to use ipfw for that purpose, because it build-in into kernel. We set for example rule Code: Select allipfw add divert 2000 ip from any to 1.0.1.1
and we can use our own application to process those packets, reinject them forward etc. It will work also fast, because as I said, it build into kernel.
Is there any standart Linux-based solution to do the same? I found some info about netmap-ipfw. Is this a correct solution? Or I have to use for example IP-aliases and iptables to do that?
I need to process all the IP-packets, not only TCP/UDP/etc-protocol. Solution also must be very fast.
I would like to redirect traffic coming from a machine A through a SOCKS proxy (setted on machine B)Machine B run "ssh -D 4242". So that create a SOCKS proxy on machine B.Machine A would like to connect on the internet, but the only way is to use machine B SOCKS proxy. The problem is machine A don't know how to use SOCKS Proxy. (Actually, i can just set ip, netmask and gateway on machine A).So, I would like to set up something on machine B that will redirect all traffic coming from machine A throught the SOCKS proxy.
I have a strange iptables issues. I have just built a new Debian install and starting adding some real basic rules (see below) the problem seems to be that the localhost itself can't get any returning traffic. That is, it seems to be allowed outgoing traffic but not the connected, returning traffic. Ordinarily allowing Established Connections would resolve this, see the rule below, but it hasn't. Why this doesn't work. Removing the last DROP in the INPUT chains obviously makes the traffic work!
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -j ACCEPT -p tcp --dport 22 iptables -A INPUT -j ACCEPT -s x.x.x.x iptables -A INPUT -j ACCEPT -s x.x.x.x iptables -A INPUT -j ACCEPT -s x.x.x.x -p tcp --dport 80 iptables -A INPUT -j ACCEPT -s x.x.x.x -p tcp --dport 8080 iptables -I INPUT 1 -i lo -j ACCEPT iptables -A INPUT -j DROP
I am running Debian Squeeze on an old pc (AMD K62-500) which serves as my multiwan router and torrent box. Internet uplink is provided via a dsl line and 2 wireless canopy modules.
Setup has been generally fine except when connecting/downloading as free user from sites like rapidshare, hotfile, filesonic, etc. The problem arises when I am connected to these sites using the wireless uplinks because of the shared public ip. I don't really download that much using direct download methods so I don't really see myself being a premium user from these sites.
If these sites are on a specific ip or ip range, an entry on the static routing table would have been fine but when I tried using ping, a different ip would appear to reply each time.
I wonder if there can be a solution like using iptables where in traffic to and from these sites will only use the NIC connected to the dsl line.
I am in serious situation involving PPTP protocol VPN in Debian 8 Jessie stable. I recently became a paid VPN subscriber. Using PPTP; Is there a way to automatically route all traffic through ppp0? Im getting the vpn service killed (ip address goes back to normal unmasked state) whenever there is a power outage (modem reset) and there are alot of those where I live, Im going to get astabilizer and I need a software solution for the situation as well. Theres gotta be a way to route all traffic through the VPN route ppp0 . I tried adding persist and maxfail 0 to the pptp config file but it did not do what i wanted.
On a second note, its clear to add that I basically need a way to also auto load the line
pppd call blabla.net and route add default dev ppp0
On system startup by default so the computer does not use "Wired" connection ^at all^ when not through ppp0. Any other way of not losing VPN anonymity ever due to hardware malfunction.
Is there a way to do this? Ive looked on the net and everything seems like its either from the nineties or can fry my pc , Im no debian expert, less than a year at linux..
Need it to use wired only if ppp0 is being used so if its no vpn, no connection at all period,
These kernel sources are usually the sources from debian, with a couple of more patches that I add. It appears that for nvidia-driver package versions higher than 352.79-1, the kernel headers/sources need to be prepared with 'make prepare' and 'make prepare scripts'. It's that simple. I concluded this after the nvidia dkms build failed on my custom kernel, but then succeeded after I pointed it to the full sources, but only after running 'make prepare' and 'make prepare scripts' on them. The problem is that this make-kpkg scheme doesn't appear to do this, or if it does, it doesn't properly include in the headers everything that it should.
My system is rather flaky as of late. I was trying, yet again, to get the internal bluetooth (rtl8723be) to work, so I could free up one of only two usb ports on the lenovo ideapad 100. In my blinding brilliance I typed make uninstall, after make did not work (why I did this, I still don't know), and I noticed that it said btusb.ko was removed, as expected at reboot, no bluetooth adaptors were found, I tried reinstalling bluetooth via apt-get, no success, so finally I just ran apt-get update, and apt-get upgrade, once finished, my system did not want to reboot with a sudo init 6, so I hard powered it off and restarted, after it's obligatory fsck, everything okie dokie, it booted up and voila, bluetooth working again, or should I say, the usb adaptor bluetooth, not the rtl8723be.
So I figured, ah, the heck with it, just enjoy my speaker for watching a movie via kodi, and that's when I see that it's buffering continuously so I check a couple different speed tests, and my wifi is only pulling 2.0ish mb down, I booted into windows 10, just to check, and sure enough, same result.....so I don't know if the adapter is dying or what, so, I figure, I'll try and update the driver, this is where I run into not being able to run any make commands they all error with:
Code: Select allmake[1]: Entering directory '/lib/modules/3.16.0-4-amd64/build' make[1]: *** No rule to make target 'modules'. Stop. make[1]: Leaving directory '/lib/modules/3.16.0-4-amd64/build' Makefile:393: recipe for target 'LINUX' failed make: *** [LINUX] Error 2
I have installed the linux headers, and followed this post here, [URL] .... (substituting my uname -r of course)
still having the sudo init 6 not working, and the slow wifi, as well as internal bluetooth not working.
I have installed jessie on a couple of machines. One is configured as the NFS filesystem exporter and NIS server. The other one, I am trying to configure as NFS and NIS client. NFS does not seem too much of a problem, I can mount the exported filesystem to a directory in the client and unmount it, but when I install NIS the system becomes very slow. Any command preceded by "sudo" takes a very long time (a few minutes) to complete. Then, upon rebooting the system, it reports many services failed to start (login, accounts, modem manager, avahi, network manager, exim). When if finally completes, I get a terminal login, instead the graphic login window.
i use a telekom s100 set-top-box, which originally had a prism54 wlan-card. but wlan was very slow. but the driver was working well and it did not seem to be a configuration issue, so i assumed that its that card which is so slow. following i purchased a atheros based wlan-card which is working perfectly well with the ath5k driver of my linux kernel (2.6.26-1-686). but the connection is pretty bad anyway. i get max 300kb/s from pc to pc. as its the same with 3 different cards i tested in the s100 i assume it is a configuration issue? or might there be chipset or mini-pci-slot limitation?
when i check the connection with iwconfig the bitrate is somewhere between 1-54mb/s, rising to 54mb/s and then falls back to 1mb/s, rising to 54mb/s again, falling down, its an infinite loop. im using wpa_supplicant for the connection, but i don't think thats the malefactor. well, you never know .. i tried to set the bitrate with iwconfig wlan0 rate 54M but that ended in a disconnection ...
I'm running testing and over the last week or two my system is getting slow. Any disk access slows everything to a crawl. Even the cli can take several seconds to display characters as I type them.
Intel Core i7-5500U with Intel HD Graphics.So I updated to the backports kernel and backports intel xorg drivers and I have the weirdest thing.Everything is stuttery even cinnamon desktop effects are no longer smooth. If I boot back to 3.16, everything is butter (except the screen corruption). Even my favorite wine game dropped 25% in fps.
I remember that on windows, if the cpu is too slow (pstate_min_speed), graphics is also stuttery. However, increasing /sys/devices/system/cpu /intel_ pstate/min_perf_pct even to 100% didn't do the trick. I suspect, that this measure is causing it: URL....
how to increase the performance again? I just found out, after running glxgears (with about 40 fps), that xrandr shows an available framerate of 40fps
xrandr Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767 eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 293mm x 165mm 1920x1080 60.00*+ 59.93 40.00
I guess that's what makes it feel slow. Do you know how to get that back up to 60 (fixed)? It seems like the screen refresh rate set in xrandr has no effect on the problem. When I boot, glxgears runs with 60 fps and everything is fine. After a while, it drops to 40 and the whole desktop keeps stuttering. if I change the resolution with xrandr and then change it back, it goes to 60 again for a while
 Attributes:   coresize      = "1028096"   initsize      = "0"   initstate      = "live"   refcnt       = "5"   taint        = ""   uevent       = <store method only>
Let me introduce myself, my name is Carlos AlegrÃa from Chile and I'm System administrator for a educational Institute. We use samba+ldap, for login accounts and file sharing but we not use samba with PDC.
Long time ago at the 2009 year, I was Installing the same system and this worked perfectly. But on our summer the hard disk of server has broken, so i was need installing all the system again. So the problem is with SAMBA, when i connect to the network resource, this is to slow, and when i try transfer files are slow.
My sistem is on Debian 8 Jessie and the Samba Version is 2:4.1.17+dfsg-2+deb
Code: Select all[global]   workgroup = LABORATORIO   netbios name = Shinigami   server string = debian
I've been keeping my feet wet learning Debian. So far only in a virtual machine but I have had that machine running every day. I'm running a Lenny/Squeeze mix.The system is running well, yet every time I reboot or halt the system there is a long pause at the "Deconfiguring network devices" message. I traced the message to S35networking. With this virtual machine, which is a model for my eventual physical machine installation, I have only a single wired eth0 NIC (pcnet32).
I'll take a wild guess the script might be trying to find additional cards to halt, or perhaps a wireless card that does not exist, but that is just a guess. I'm stil learning my way around with how the init.d scripts and various /etc config files interact.I'm using a static IP address. DHCP is disabled, as far as I can tell. I did not notice anything in the logs.
I have 2 ASUS Boxes (one with 8GB, one with 4GB) When both mtus are set at 7200, using scp to copy a 56MB file takes 2:06. If I reduce either mtu to 1500, the speed is 2 seconds. I'm wondering if this is some kind of kernel bug or driver bug or what. For the moment, I've lowered the mtu to 1500 to get the performance out of the machines, but find it interesting that what should make it faster is actually slowing down. Where should I post this to get it looked at? Is anyone else seeing it.I see a similar performance issue with smbclient too.
How can I forward all traffic from a public IP to another public IP. Let's say I have a first debian box named box1 with eth0 = 1.1.1.1 and eth0:1 = 1.1.1.2 and I want to forward all traffic from 1.1.1.2 to "box2" located somewhere else over the internet and having for eth0 2.2.2.2 Both 1.1.1.0/24 and 3.3.3.0/24 are public IP ranges.
FLAGS=" --archive --one-file-system --acls --xattrs --numeric-ids --fake-super --progress --human-readable --ignore-existing --log-file="backup.log" "                                                        Â
FLAGS+=" ${DIRS} ${BACKUP_FILE}"
rsync ${FLAGS}Â Â
I then used iptraf to check the performance and I get miserable results (from the PC), even below 1 MB:
I got a new machine with GA-p55A-ud3 mobo and a WDC WD10EARS 1T disk. When I tried to benchmark the disk IO, I was suprised by the low write speed:
[Children see throughput for 1 initial writers = 35962.63 KB/sec Parent sees throughput for 1 initial writers = 35962.63 KB/sec Min throughput per process = 35962.63 KB/sec
I have a mysql server in guest domU on debian squeeze. when i create test table and do INSERT INTO test (name, value) VALUES(RAND(), RAND()); Query OK, 1 row affected (0.28 sec)
At other physical server with same configuration Query OK, 1 row affected (0.00 sec)
I try this several time but on physical server max value never get over 0.05sec and on VM lowest value was 0.13sec.
Another tests:
On physical server:
OLTP test statistics:
Threads fairness:
on VM:
OLTP test statistics:
Threads fairness:
performance of disk write speed on VM is much better then on physical server .
Just installed squeeze and noticing slow responses to ping. Ping with -n is fine, and as expected. Ping without -n is very slow to appear on the screen.
ben@WOPR:~$ ping google.com PING google.com (74.125.230.114) 56(84) bytes of data. 64 bytes from 74.125.230.114: icmp_req=1 ttl=54 time=26.2 ms 64 bytes from 74.125.230.114: icmp_req=2 ttl=54 time=25.9 ms 64 bytes from 74.125.230.114: icmp_req=3 ttl=54 time=29.3 ms 64 bytes from 74.125.230.114: icmp_req=4 ttl=54 time=25.5 ms ^C64 bytes from 74.125.230.114: icmp_req=5 ttl=54 time=25.8 ms
--- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 20199ms rtt min/avg/max/mdev = 25.514/26.569/29.308/1.399 ms ben@WOPR:~$ ping -n google.com PING google.com (74.125.230.115) 56(84) bytes of data. 64 bytes from 74.125.230.115: icmp_req=1 ttl=54 time=25.6 ms 64 bytes from 74.125.230.115: icmp_req=2 ttl=54 time=26.0 ms 64 bytes from 74.125.230.115: icmp_req=3 ttl=54 time=26.8 ms 64 bytes from 74.125.230.115: icmp_req=4 ttl=53 time=21.5 ms ^C --- google.com ping statistics --- 5 packets transmitted, 4 received, 20% packet loss, time 4006ms rtt min/avg/max/mdev = 21.540/25.042/26.859/2.064 ms
I've tried disabling ip6, disabling avahi and adding options single-request to my /etc/resolv.conf - problem remains. If it helps when installing Squeeze was prompted to install firmware-realtek, which I didn't have. So downloaded onto usb from another machine installed once setup was complete.
I got a TP-Link WN951N Wireless-N PCI card for my Squeeze HTPC (this is AR5008. Performance is awful. On the lucky runs I'm getting 4 MB/s from Samba, most of the times I'm seeing 1-2 MB/s, and sometimes less than 1 MB/s. Also, ssh is not smooth, e.g. when I type commands, it can take seconds before text appears on the console, or I get slo-mo. Forcing 11g gets me a consistent 2.2 MB/s but lag is still there.
The machine has also been tested under XP SP3 and pulled off a solid 11 MB/s on a large file with no lag, so the hardware would seem OK. I've tried several kernel versions (both Liquorix and Debian stock), and a couple versions of compat-wireless (2.6.38-rc4 and 2011/03/03 bleeding edge), with little variation in outcomes. The logs got no weird messages in them, although with the more recent drivers/kernels iwconfig looks like this:
wlan0 IEEE 802.11bgn ESSID:"GuessIt" Mode:Managed Frequency:2.457 GHz Access Point: x:y:z:t:u:w Bit Rate=270 Mb/s Tx-Power=19 dBm Retry long limit:7 RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=46/70 Signal level=-64 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:64 Invalid misc:19967 Missed beacon:0
Tx discarded packets are through the roof and excessive retries is not bad either. The system doesn't run NetworkManager, wicd or whatnot. All of the wireless is configured through /etc/network/interfaces: # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback
Up until very recently I've had a wired network, and at boot I'd see messages about DHCPREQUEST and DHCPOFFER and stuff as it set up the wired network.
Now I've just got wireless working instead, but it still tries to use DHCP on the no-longer-existing wired network. So it says "DHCPDISCOVER on eth0..." and waits for a bit, then again and waits again, and all the time the boot is waiting for a reply to its DHCP requests and it's not going to get one. It doesn't seem to do any harm, because once it's given up and proceeded with the boot then the wireless does seem to work fine, but I'd like to speed up the boot a little by cutting out this needless waiting. Has anyone got an idea how I can stop it? I tried in Preferences-Network connections and in Administration-Network, and in System Tools-Network tools, and also from the network icon in the task bar, but I can't find anything which lets me configure the wired network eth0 or disable it or disable the DHCP.
I have Acer Aspire 4740 laptop with Atheros ar928x wireless. My wireless is very slow, unstable. Wireless card still works well and fast in Windows (dual booting). After searching I see that there are many Ubuntu users have the same problem in Ubuntu 11.04 with this card.