Skip to contentSkip to conversation

Routing / ip rule / fwmark

LARTC Guillaume Urbejtel 1 participant 2 messages Nov 22, 2004

lore
Share & tools
lore
#0 lore raw

Hi All,

I'm setting up a box with one default route and another handling only web connection.
Here my conf :

iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 3

0: from all lookup local
32766: from all lookup main <- wich contain route to my lan and internet inferfaces
32767: from all fwmark 3 lookup webbox <- wich contain only the
default route for wen traffic
32768: from all lookup default <- which contain only the other default route

The problem : Packets to port 80 go tough the webbox thanks to fwmark but the reply from webbox don't cross the fw...
What's the reason ?

Thanks !

Guillaume from france

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

#1 lore raw

Its OK now,

The problem was the rp_filters...

Quoted 20 lines · Guillaume Urbejtel

Hi All,

I'm setting up a box with one default route and another handling only web connection.
Here my conf :

iptables -t mangle -A PREROUTING -p tcp --dport 80 -j MARK --set-mark 3

0: from all lookup local
32766: from all lookup main <- wich contain route to my lan and internet inferfaces
32767: from all fwmark 3 lookup webbox <- wich contain only
the default route for wen traffic
32768: from all lookup default <- which contain only the other default route

The problem : Packets to port 80 go tough the webbox thanks to fwmark but the reply from webbox don't cross the fw...
What's the reason ?

Quoted 9 lines

Thanks !

Guillaume from france

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

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