Projet

Général

Profil

Iproute2 » Historique » Version 1

Laurent GUERBY, 16/07/2012 18:44

1 1 Laurent GUERBY
{{>toc}}
2 1 Laurent GUERBY
3 1 Laurent GUERBY
h1. Iproute2
4 1 Laurent GUERBY
5 1 Laurent GUERBY
h2. ADSL multiple
6 1 Laurent GUERBY
7 1 Laurent GUERBY
En cas de multiples box ADSL en mode routeur, activer la redirection 2222 vers localIP:22
8 1 Laurent GUERBY
9 1 Laurent GUERBY
<pre>
10 1 Laurent GUERBY
	# Orange routing, local IP 10.0.0.221
11 1 Laurent GUERBY
        ip route add 10.0.0.0/24 dev eth0 table 253
12 1 Laurent GUERBY
	ip route add default via 10.0.0.253 table 253
13 1 Laurent GUERBY
        ip rule add from 10.0.0.221 table 253
14 1 Laurent GUERBY
15 1 Laurent GUERBY
	# FDN routing, local IP 192.168.88.221
16 1 Laurent GUERBY
        ip route add 192.168.88.0/24 dev eth0 table 88
17 1 Laurent GUERBY
	ip route add default via 192.168.88.2 table 88
18 1 Laurent GUERBY
        ip rule add from 192.168.88.221 table 88
19 1 Laurent GUERBY
20 1 Laurent GUERBY
	# Free routing, local IP 192.168.89.221
21 1 Laurent GUERBY
        ip route add 192.168.89.0/24 dev eth0 table 89
22 1 Laurent GUERBY
	ip route add default via 192.168.89.1 table 89
23 1 Laurent GUERBY
        ip rule add from 192.168.89.221 table 89
24 1 Laurent GUERBY
25 1 Laurent GUERBY
        # via VPN
26 1 Laurent GUERBY
	ip link set tapbackup up
27 1 Laurent GUERBY
        # openvpn...
28 1 Laurent GUERBY
        ip addr add 172.30.30.3/31 dev tapbackup
29 1 Laurent GUERBY
        ip route add default via 172.31.30.2 table 15
30 1 Laurent GUERBY
        ip rule add from 172.30.30.3 table 15
31 1 Laurent GUERBY
</pre>
32 1 Laurent GUERBY
33 1 Laurent GUERBY
Ensuite "openvpn --local 10.0.0.221 --lport 0"  passera par Orange, "openvpn --local 192.168.88.221 --lport 0" par FDN, etc...