<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <br>
    <br>
    On 10/15/2010 08:48 AM, C. L. Martinez wrote:
    <blockquote
      cite="mid:AANLkTimPJGtoVSOigwM+3iV65mX8_Z64yF1ZQjSejouC@mail.gmail.com"
      type="cite">
      <div><br>
        <div class="gmail_quote">On Wed, Oct 13, 2010 at 11:22 AM, C. L.
          Martinez <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:carlopmart@gmail.com">carlopmart@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            Hi all,
            <div><br>
            </div>
            <div> I need to route local generated packages depending on
              which tcp or udp service I need to use. To accomplish this
              I have configured two routing tables:</div>
            <div><br>
            </div>
            <div>
              <div>[root@lothlorien ~]# ip ru ls</div>
              <div>0:      from all lookup 255 </div>
              <div>32762:  from all fwmark 0x2 lookup FirstLan </div>
              <div>32763:  from all fwmark 0x1 lookup SecondLan </div>
              <div>32764:  from 172.25.80.10 lookup SecondLan </div>
              <div>32765:  from 172.25.70.18 lookup FirstLan </div>
              <div>32766:  from all lookup main </div>
              <div>32767:  from all lookup default</div>
            </div>
            <div><br>
            </div>
            <div>My routing tables:</div>
            <div><br>
            </div>
            <div>
              <div>[root@lothlorien net]# ip ro show table FirstLan</div>
              <div><a moz-do-not-send="true"
                  href="http://172.25.70.16/28" target="_blank">172.25.70.16/28</a>
                dev eth1  proto kernel  scope link  src 172.25.70.18 </div>
              <div>default via 172.25.70.30 dev eth1</div>
            </div>
            <div><br>
            </div>
            <div>
              <div>
                <div>[root@lothlorien net]# ip ro show table SecondLan</div>
                <div><a moz-do-not-send="true"
                    href="http://172.25.80.0/24" target="_blank">172.25.80.0/24</a>
                  dev eth1  proto kernel  scope link  src 172.25.80.10</div>
              </div>
            </div>
            <div>default via 172.25.80.1 dev eth2</div>
            <div><br>
            </div>
            <div> And my iptables rule is:</div>
            <div><br>
            </div>
            <div> iptables -t mangle -A OUTPUT -p udp --dport 53  -j
              MARK --set-mark 1</div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    I had a similar problem, so I wrote the mark as 0x1 :<br>
    iptables -t mangle -A OUTPUT -p udp --dport 53  -j MARK --set-mark
    0x1<br>
    <br>
    --<br>
    MM<br>
  </body>
</html>