Skip to contentSkip to conversation

Confuse, putting packets in wrong mangle table.

LARTC Rio Martin. 2 participants 2 messages Jan 19, 2005

lore
Share & tools
lore
#0 lore raw

Folks,
I am a little bit confuse in how to put these packets into correct mangle table for traffic shaping.

This is what i ve planned to do:

- - - - :eth0 [ LINUX-BOX ] eth1: - - - -

Let say:
eth0: 220.100.1.1
eth1: 192.168.1.1
eth1:1 192.168.1.2

192.168.1.0/24 get natted into 220.100.1.1 before reaching the internet. I put every packets coming from internet (eth0) this way:

# iptables -t mangle -I PREROUTING -i eth0 .. * * * *

But what if i would like to do the same way with ip 192.168.1.1 and 192.168.1.2 ? How to put the packets in correct mangle table?

Thanks before ..

Regards,
Rio Martin.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Hi!

Quoted 13 lines · Rio Martin.

Folks,
I am a little bit confuse in how to put these packets into correct mangle table for traffic shaping.

This is what i ve planned to do:

- - - - :eth0 [ LINUX-BOX ] eth1: - - - -

Let say:
eth0: 220.100.1.1
eth1: 192.168.1.1
eth1:1 192.168.1.2

Quoted 6 lines

192.168.1.0/24 get natted into 220.100.1.1 before reaching the internet. I put every packets coming from internet (eth0) this way:

# iptables -t mangle -I PREROUTING -i eth0 .. * * * *

But what if i would like to do the same way with ip 192.168.1.1 and 192.168.1.2 ? How to put the packets in correct mangle table?

You can only shape traffic leaving your interface. You have to shape the incoming traffic at interface eth1, the outgoing traffic at interface eth0.

This site is great for learning:
http://www.knowplace.org/shaper/qdisc.html#egress

I found to use iptables+CLASSIFY method the easiest way to classify packets.

Your question is a little dizzy...

Signature · 5 lines
Udv,
   Nandor
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/