Networking Forums

Networking Forums > Computer Networking > Linux Networking > iptables --set-mark problem

Reply
Thread Tools Display Modes

iptables --set-mark problem

 
 
kris wolff
Guest
Posts: n/a

 
      05-28-2004, 09:43 AM
Hi List,

i have a iproute2 tables that is working fine.
Here it is:
....
ip route flush table 4
ip route add table 4 192.168.0.0/24 dev eth0 scope link
ip route add table 4 default via 192.168.0.60
....

i tryed to add a host to that table:
ip route add to 10.100.52.110 lookup 4

and it works fine

now, i remove that host line and set a --set-mark option to the iptables
script:

iptables -t mangle -A PREROUTING -d 10.100.52.110 -j MARK --set-mark 4

but i can not access the host after starting the script. It will not
route via 192.168.0.60 (Cisco-VPN-Router), and i can not access the
website on 10.100.52.110.

in case that the
ip route add to 10.100.52.110 lookup 4
works fine, i suppose the thing is the firewall. The set Mark is not
working well.
Have i done somthing wrong? something missed?

Thanx for any advice.

Kris

 
Reply With Quote
 
 
 
 
Antoine EMERIT
Guest
Posts: n/a

 
      05-30-2004, 09:36 AM
kris wolff <(E-Mail Removed)> wrote news:(E-Mail Removed):
> ...
> ip route flush table 4
> ip route add table 4 192.168.0.0/24 dev eth0 scope link
> ip route add table 4 default via 192.168.0.60
> ...
>
> i tryed to add a host to that table:
> ip route add to 10.100.52.110 lookup 4
>
> and it works fine
>
> now, i remove that host line and set a --set-mark option to the iptables
> script:
>
> iptables -t mangle -A PREROUTING -d 10.100.52.110 -j MARK --set-mark 4
>
> but i can not access the host after starting the script. It will not
> route via 192.168.0.60 (Cisco-VPN-Router), and i can not access the
> website on 10.100.52.110.


I don't see the link between your mark and your routing table (there is no
default association with an iptables --set-mark)

Did you set it, like this ?

ip rule add fwmark 4 table 4

Regards
 
Reply With Quote
 
kris wolff
Guest
Posts: n/a

 
      06-01-2004, 07:31 AM
>
> I don't see the link between your mark and your routing table (there is no
> default association with an iptables --set-mark)
>
> Did you set it, like this ?
>
> ip rule add fwmark 4 table 4
>
> Regards


ooups, sorry, i forgot to post. Shure i set it.
Thanx for remaining.

Kris

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"iptables mark with filter fw" vs "u32 match" =?ISO-8859-2?Q?Pawe=B3?= Staszewski Linux Networking 3 03-05-2005 09:23 PM
iptables mark qos moritz gartenmeister Linux Networking 0 08-20-2004 08:57 AM
iptables MARK and Routing Steve Wakelin Linux Networking 0 07-01-2004 12:06 AM
iptables --set-mark and htb Ryan Alder Linux Networking 0 09-29-2003 02:30 PM
Re: HTB/CBQ and iptables MARK problem joseph philip Linux Networking 0 07-08-2003 06:00 PM



1 2 3 4 5 6 7 8 9 10 11