Nadal próbuję ustawić dwa łącza DSL na jednym NND.
Konfiguracja:
kernel24 2.4.32-10nnd
iptables 1.3.4-10nnd
iproute 020116-5nnd
firewall 0.2-1nnd
eth0=DSL # cała reszta 83.xx.xx.114
eth1=LAN
eth2=DSL2 #www. ftp, poczta ping 83.xx.xx.202
moje tablice routingu:
[root@ admin]# ip route
83.xx.xx.112/29 dev eth0 proto kernel scope link src 83.xx.xx.114
83.xx.xx.200/29 dev eth2 proto kernel scope link src 83.xx.xx.202
192.168.5.0/24 dev eth1 proto kernel scope link src 192.168.5.1
127.0.0.0/8 dev lo scope link
default via 83.xx.xx.113 dev eth0
[root@ admin]# ip route show table DSL2
83.xx.xx.202 dev eth2 scope link
192.168.5.0/24 dev eth1 scope link
default via 83.xx.xx.201 dev eth2
[root@admin]# ip rule
0: from all lookup local
201: from all fwmark 64 lookup DSL2
202: from 83.xx.xx.200/29 lookup DSL2
32766: from all lookup main
32767: from all lookup default
i po wykonaniu markowania
#!/bin/sh -x
iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark
iptables -t mangle -A PREROUTING -m mark ! --mark 0 -j ACCEPT
# PING
iptables -t mangle -A PREROUTING -s 192.168.5.0/24 -p icmp -j MARK --set-mark 100
# FTP
iptables -t mangle -A PREROUTING -s 192.168.5.0/24 -p tcp --dport 20 -j MARK --set-mark 100
iptables -t mangle -A PREROUTING -s 192.168.5.0/24 -p tcp --dport 21 -j MARK --set-mark 100
iptables -t mangle -A PREROUTING -s 192.168.5.0/24 -p tcp -m mark --mark 100 -j CONNMARK --save-mark
niestety pakiety na porcie 21 nie lecą przez eth2
[root@admin]# iptables -L PREROUTING -t mangle
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
CONNMARK all -- anywhere anywhere CONNMARK restore
ACCEPT all -- anywhere anywhere MARK match !0x0
MARK icmp -- 192.168.5.0/24 anywhere MARK set 0x64
MARK tcp -- 192.168.5.0/24 anywhere tcp dpt:ftp-data MARK set 0x64
MARK tcp -- 192.168.5.0/24 anywhere tcp dpt:ftp MARK set 0x64
CONNMARK tcp -- 192.168.5.0/24 anywhere MARK match 0x64 CONNMARK save
ns_upload all -- 192.168.5.0/24 anywhere
tablica mangle po restarcie niceshapera0.6
Juz mi ręcę opadają nie wiem co jest grane
Proszę o pomoc!!!