Доброе время суток.
Помогите разобраться, гугл уже замучил...
Есть комп с Centos 7 с двумя сетевыми картами. Соответственно два канала в интернет.
Задача: весь трафик пускать по одному каналу, а DNS по другому.
Сейчас настроено так (пакеты не уходят в нужный интерфейс и, видимо поэтому, [bad udp cksum 0x109a -> 0x7832!]):
# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens35: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b9:39:6c brd ff:ff:ff:ff:ff:ff
inet 192.168.133.181/24 brd 192.168.133.255 scope global ens35
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb9:396c/64 scope link
valid_lft forever preferred_lft forever
3: ens36: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:b9:39:76 brd ff:ff:ff:ff:ff:ff
inet 192.168.132.20/24 brd 192.168.132.255 scope global ens36
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:feb9:3976/64 scope link
valid_lft forever preferred_lft forever#!/bin/bash
IPT=/sbin/iptables
IPTS=/sbin/iptables-save
ext_ip1="192.168.133.181"
ext_ip2="192.168.132.20"
$IPT -F
$IPT -t nat -F
$IPT -t mangle -F
$IPT -P INPUT DROP
$IPT -P OUTPUT DROP
### STATE RULES
$IPT -A INPUT -m state --state INVALID -j DROP
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
### LOCALHOST
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
### DNS
$IPT -A INPUT -p udp --sport 53 -j ACCEPT
$IPT -A OUTPUT -p udp --dport 53 -j ACCEPT
### ICMP
$IPT -A INPUT -p icmp -j ACCEP
$IPT -A OUTPUT -p icmp -j ACCEP
### SSH
$IPT -A INPUT -p tcp --dport 22 -j ACCEPT
$IPT -A OUTPUT -p tcp --sport 22 -j ACCEPT
$IPT -t mangle -A OUTPUT -p udp --dport 53 -j MARK --set-mark 2
$IPT -t nat -A POSTROUTING -o ens35 -j SNAT --to $ext_ip1
$IPT -t nat -A POSTROUTING -o ens36 -j SNAT --to $ext_ip2
$IPTS > /etc/sysconfig/iptables
# ip route list
default via 192.168.132.130 dev ens36
127.0.0.0/8 dev lo scope link src 127.0.0.1
169.254.0.0/16 dev ens35 scope link metric 1002
169.254.0.0/16 dev ens36 scope link metric 1003
192.168.132.0/24 dev ens36 proto kernel scope link src 192.168.132.20
192.168.133.0/24 dev ens35 proto kernel scope link src 192.168.133.181
# ip route list table t_181
default via 192.168.133.131 dev ens35
127.0.0.0/8 dev lo scope link src 127.0.0.1
192.168.133.0/24 dev ens35 proto kernel scope link src 192.168.133.181
# ip route list table t_20
default via 192.168.132.130 dev ens36
192.168.132.0/24 dev ens36 proto kernel scope link src 192.168.132.20
192.168.133.0/24 dev ens35 proto kernel scope link src 192.168.133.181
# ip rule list
0: from all lookup local
32762: from all fwmark 0x1 lookup t_20
32763: from 192.168.132.20 lookup t_20
32764: from all fwmark 0x2 lookup t_181
32765: from 192.168.133.181 lookup t_181
32766: from all lookup main
32767: from all lookup default
# sysctl -a|grep rp_filter
sysctl: reading key "net.ipv6.conf.all.stable_secret"
sysctl: reading key "net.ipv6.conf.default.stable_secret"
sysctl: reading key "net.ipv6.conf.ens35.stable_secret"
net.ipv4.conf.all.arp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.default.arp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.ens35.arp_filter = 0
net.ipv4.conf.ens35.rp_filter = 0
net.ipv4.conf.ens36.arp_filter = 0
net.ipv4.conf.ens36.rp_filter = 0
net.ipv4.conf.lo.arp_filter = 0
net.ipv4.conf.lo.rp_filter = 0
sysctl: reading key "net.ipv6.conf.ens36.stable_secret"
sysctl: reading key "net.ipv6.conf.lo.stable_secret"
ping ya.ru
# tcpdump -i any udp port 53 -nn -vv
tcpdump: listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
13:53:33.832951 IP (tos 0x0, ttl 64, id 14782, offset 0, flags [DF], proto UDP (17), length 51)
192.168.132.20.39072 > 192.168.11.4.53: [bad udp cksum 0x109a -> 0x7832!] 1357+ A? ya.ru. (23)
13:53:33.840414 IP (tos 0x0, ttl 127, id 16365, offset 0, flags [DF], proto UDP (17), length 67)
192.168.11.4.53 > 192.168.132.20.39072: [udp sum ok] 1357 q: A? ya.ru. 1/0/0 ya.ru. A 87.250.250.242 (39)
^C
2 packets captured
2 packets received by filter
0 packets dropped by kernel
Может кто сталкивался с таким? Очень нужно!