Good evening list, I'm trying to set up routing based on destination port; I have different vpn-connections which should be used for different ports. I used the information I found here[1].
I tried the following:
> iptables -t mangle -A PREROUTING -i $LAN -p tcp -m tcp --dport 443 -j MARK
> --set-mark 1
>
> if ! cat /etc/iproute2/rt_tables | grep -q '^251'
> then
> echo '251 rt_link1' >> /etc/iproute2/rt_tables
> fi
>
> ip route flush table rt_link1
> ip route add table rt_link1 default dev $VPN_1
>
> ip rule del from all fwmark 1 2>/dev/null
> ip rule add fwmark 1 table rt_link1
> ip route flush cache
Sadly this doesn't work; it seems like the ip-command doesn't have these
options and the /etc/iproute2 directory doesn't exists:
> cat: /etc/iproute2/rt_tables: No such file or directory
> /etc/init.d/S45firewall: /etc/firewall.conf: 189: cannot
> create /etc/iproute2/rt_tables: Directory nonexistent
>
> ip: argument "rt_link1" is wrong: invalid "table"
> ip: an inet address is expected rather than "table".
> BusyBox v1.1.3 (2007.05.28-13:08+0000) multi-call binary
>
> Usage: ip [ OPTIONS ] { address | link | route | tunnel } { COMMAND |
> help }
>
> ip [ OPTIONS ] OBJECT { COMMAND | help }
> where OBJECT := { link | addr | route | tunnel }
> OPTIONS := { -f[amily] { inet | inet6 | link } | -o[neline] }
I tried it on a different linux (ubuntu), and it works there. I searched
for the iproute-package but didn't find it. Does anybody know how to
solve this? I'm not that handy with these kind of things...
[1] http://www.sysresccd.org/Sysresccd-networking_en_Destination-port-routing
Thanks in advance,
M.
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ freewrt-users mailing list [email protected] https://www.freewrt.org/lists/listinfo/freewrt-users
