Jump to content
IGNORED

Post your favorite code snippet


acidphakist

Recommended Posts

As far as I understand, a queue is used to subdivide a pipe. For example, you set up a pipe for any packets with a maximal bandwidth of 1Mb/s.

Then you add a queue for john's packets with a a weight of 10

and a queue for you own packets with a weight of 90.

If you're both sending at 1Mb/s, you'll be ensured that john's packets are not being sended at more than 100kb/s.

But i'm using these feature in a blind way. I don't know what happens to packets that are "paused/frozen" by the pipe/queue mechanism. Are they delayed ? Or dropped ?

Also : I measured my ping before to start adding pipes and queues, so i'm fairly certain it is not caused by my own shady activities. According to a technician that works at my ISP, my router's cache gets clogged up, because it refuses to send at more than 128kb/s.

 

How does this work? I mean, you intercept the packages sent by your neighbour, but isn't the router getting them as well? How did you become a gateway?

 

If your neighbour is making too many connections (and default torrent client settings have pretty high connection limits) many routers will get clogged. You should be able to limit the connection count with ipfw as well. Also, ipfw should delay, not drop.

Link to comment
Share on other sites

Guest hahathhat

Chaosmachine, thanks for deleting my reply. I'm sure I looked like a real prick.

 

Anyhow, I'll accept your 1337 h4x0r challenge any day of the week, hat.

 

what challenge? there's no challenge to you at all. all i have to do is prod you with a stick a little, and watch you spaz out.

Link to comment
Share on other sites

*didn't delete anything*

 

anyway, back on topic:

 

alias ll='ls -alF'

 

Less typing for long file lists.

 

This is something I came up with on my own years ago, but I guess I wasn't the only one, as it's suddenly become a standard alias on Ubuntu.

Link to comment
Share on other sites

Guest hahathhat

*didn't delete anything*

 

anyway, back on topic:

 

alias ll='ls -alF'

 

Less typing for long file lists.

 

This is something I came up with on my own years ago, but I guess I wasn't the only one, as it's suddenly become a standard alias on Ubuntu.

 

i do that too, but i make it simply 'l'. then ls get aliased ls --color...

Link to comment
Share on other sites

for all the BoC nostalgics.

 

fd 50
rt 60
fd 50
rt 60
fd 50
rt 60
fd 50
rt 60
fd 50
rt 60
fd 50
rt 60

 

also Babr - why the hell is your neighbour using your Wi-Fi? Do you just leave it open? I mean that's great and all, but if some jerk is crushing your bandwidth because of torrents, ban his MAC address and set a WPA password (use AES).

Link to comment
Share on other sites

Guest Babar

How does this work? I mean, you intercept the packages sent by your neighbour, but isn't the router getting them as well? How did you become a gateway?

 

Well, i guess you already know this …

 

A computer has two kinds of address : material (MAC) and virtual (IP).

On a computer, there is an "ARP" association table for each interface : it relates a MAC address to an IP address.

The ARP protocol is in charge of keeping that table updated. (" - (to everyone) I am MAC_1 : What is the MAC address of IP_2 ?" "-(to MAC_1) I am IP_2 and my MAC address is MAC_2".

 

You can of course send fake ARP replies. This way you can poison the router and victim's ARP table :

•you tell the router the victim's MAC address is your address

•and tell the victim the router's MAC address is your address

•you forward incoming traffic to the actual destination, according to your own ARP table

 

When the router sees that a packet's MAC dest address is not its own MAC address, it just forward it. So yeah, the router gets everything.

And that's easier than going telnet with my shitty Orange box/router.

 

But I still haven't found how to limit my neighbour's outgoing traffic. I'd like something like:

•When my queue is not empty : increase the delay of my neighbour's pipe

•Once it is empty again : set the delay of my neighbour's pipe to 0.

 

 

 

also Babr - why the hell is your neighbour using your Wi-Fi? Do you just leave it open? I mean that's great and all, but if some jerk is crushing your bandwidth because of torrents, ban his MAC address and set a WPA password (use AES).

 

He's my tenant, and despite of the fact we have 2 phone lines (plus maybe an old military line :cool:), we let him use our access point (with wpa2 tk/ptk/shit + 40 characters long password). It's in the lease.

Link to comment
Share on other sites

Ah I see - can you put new firmware on your router? If you can put the tomato firmware on your router, then QoS is pretty straightforward.

Link to comment
Share on other sites

Guest Blanket Fort Collapse

i like how we can type facepalm with colons and have a :facepalm: come out.

 

lol! yeah doing neanderthal complex commands like that reminds me of feeling like an uber elite gibson haxor cyber punk just using pimple simple html way back in the day.

Link to comment
Share on other sites

That Jurassic Park filesystem browser exists. http://www.siliconbunny.com/fsn-the-irix-3d-file-system-tool-from-jurassic-park/

 

How does this work? I mean, you intercept the packages sent by your neighbour, but isn't the router getting them as well? How did you become a gateway?

 

Well, i guess you already know this …

 

A computer has two kinds of address : material (MAC) and virtual (IP).

On a computer, there is an "ARP" association table for each interface : it relates a MAC address to an IP address.

The ARP protocol is in charge of keeping that table updated. (" - (to everyone) I am MAC_1 : What is the MAC address of IP_2 ?" "-(to MAC_1) I am IP_2 and my MAC address is MAC_2".

 

You can of course send fake ARP replies. This way you can poison the router and victim's ARP table :

•you tell the router the victim's MAC address is your address

•and tell the victim the router's MAC address is your address

•you forward incoming traffic to the actual destination, according to your own ARP table

 

When the router sees that a packet's MAC dest address is not its own MAC address, it just forward it. So yeah, the router gets everything.

And that's easier than going telnet with my shitty Orange box/router.

 

But I still haven't found how to limit my neighbour's outgoing traffic. I'd like something like:

•When my queue is not empty : increase the delay of my neighbour's pipe

•Once it is empty again : set the delay of my neighbour's pipe to 0.

 

Didn't know this, very cool. :ok:

 

Don't know how to do advanced QoS using this method. I just use the QoS on my router.

Link to comment
Share on other sites

Chaosmachine, thanks for deleting my reply. I'm sure I looked like a real prick.

 

Anyhow, I'll accept your 1337 h4x0r challenge any day of the week, hat.

 

what challenge? there's no challenge to you at all. all i have to do is prod you with a stick a little, and watch you spaz out.

 

Keep saying it, it might become true!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.