Results 1 to 2 of 2

Thread: Routing problem (fwmark)

  1. #1
    Join Date
    Mar 2012

    Routing problem (fwmark)

    Hi! I'm trying to set up internet on my ubuntu 10.04 with 2 internet channels. I want to send all tcp packets through interface eth0 (isp1) and all udp packets through interface eth1 (isp2). I've read LARTC HOW-TO but still can't resolve this task.
    What I've done:
    iptables -t mangle -A OUTPUT -p tcp -j MARK --set-mark 1
    iptables -t mangle -A OUTPUT -p udp -j MARK --set-mark 2
    Then I'm adding rules:
    ip rule add fwmark 1 lookup t1
    ip rule add fwmark 2 lookup t2
    And filling tables t1 & t2
    ip ro add default via table t1
    ip ro add default via table t2
    And now if make any connections (ssh or via browser) I get: "Network is unreachable"
    Looks like rule with fwmark doesn't work because iptables mark packets:
    sudo iptables -t mangle -vnL OUTPUT
    Chain OUTPUT (policy ACCEPT 1423 packets, 147K bytes)
    pkts bytes target prot opt in out source destination
    1122 116K MARK tcp -- * * MARK xset 0x1/0xffffffff

  2. #2
    Join Date
    Mar 2012

    Re: Routing problem (fwmark)

    sorry for my english...
    I wanted to say that iptables worked fine but ip rules with fwmark didn't


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts