Xentrk
Part of the Furniture
I recommend you upgrade to 384.13. Sometimes there is changes in releases. x3mRouting code had to be updated for 384.13 to accommodate the changes to dhcp_staticlist and dhcp_hostnames which only impacts you if you use opiton 1 - x3mRouting for LAN Clients. I did not make the code backward compatible with 384.12 but I probably should have. Sorry about that. Appears that all of your LAN clients default to the WAN interface. I would recommend you upgrade to 384.13. Then, run option 1 again. When done, edit the file /jffs/configs/x3mRouting_client_rules to assign the interface for LAN Clients.Hi.
Please froward me in right direction, or say what I did wrong.
And when I try to do from the lan host
- router rt-ac86u
- firmware -384.12.0
- two vpn clients PureVPN configured with Redirect Internet traffic: Policy Rules
- your script installed today from https://github.com/Xentrk/x3mRouting
- Selected options 1 & 3, & 4
- Created vpnclient1-route-up
Code:sh /jffs/scripts/x3mRouting/load_AMAZON_ipset_iface.sh 1 AMAZON-US US
- Created vpnclient2-route-up
Code:sh /jffs/scripts/x3mRouting/load_AMAZON_ipset_iface.sh 2 AMAZON-EU EU
- iptables -t mangle -vL
Code:Chain PREROUTING (policy ACCEPT 99 packets, 10662 bytes) pkts bytes target prot opt in out source destination 1 60 MARK all -- tun12 any anywhere anywhere MARK xset 0x1/0x7 12 604 MARK all -- tun11 any anywhere anywhere MARK xset 0x1/0x7 828 54815 MARK all -- br0 any anywhere anywhere match-set AMAZON-US dst MARK or 0x1000 50 2969 MARK all -- br0 any anywhere anywhere match-set AMAZON-EU dst MARK or 0x2000 Chain INPUT (policy ACCEPT 94 packets, 10251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 2 packets, 168 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 97 packets, 11808 bytes) pkts bytes target prot opt in out source destination Chain POSTROUTING (policy ACCEPT 99 packets, 11976 bytes) pkts bytes target prot opt in out source destination
- ip rule
Code:0: from all lookup local 9990: from all fwmark 0x8000/0x8000 lookup main 9994: from all fwmark 0x2000/0x2000 lookup ovpnc2 9995: from all fwmark 0x1000/0x1000 lookup ovpnc1 32766: from all lookup main 32767: from all lookup default
- liststats
Code:AMAZON-EU - 277 AMAZON-US - 407 Skynet-Blacklist - 143700 Skynet-BlockedRanges - 1593 Skynet-IOT - 0 Skynet-Master - 2 Skynet-Whitelist - 2031
traceroute 54.239.106.252 (54.239.106.252 is in AMAZON-EU)
it's going thru wan, not ovpnc2.
Is it wrong method to check ?
Is something another wrong?
-------------------------update------------------------------------
I found the reason:
Tables for both vpnc was empty.
The reason is simple - due to no any ip-s is set via web-interface, the default routes wasn't created for them.Code:root# ip route show table 111 root# ip route show table 112 root# ip route show table opvnc1 root# ip route show table opvnc2
After adding the any record (including dumb one) for 127.127.127.127 - everything is ok
And everything is routed as it has to be.Code:root# ip route show table ovpnc1 default via 172.94.11.129 dev tun11 root# ip route show table ovpnc2 default via 45.74.60.141 dev tun12
The reason is line 429 in vpnrouting.sh (marked by me by >>>)
Code:# Setup table default route >>> if [ "$VPN_IP_LIST" != "" ]; then if [ "$VPN_FORCE" -eq 1 ]; then /usr/bin/logger -t "openvpn-routing" "Tunnel re-established, restoring WAN access to clients" fi if [ "$route_net_gateway" != "" ]; then ip route del default table "$VPN_TBL" ip route add default via "$route_vpn_gateway" table "$VPN_TBL"
Based on my testing, you should not have had to create the dummy IP entry for the route to be created. Did you see a message like the one below in the system log?
Code:
"openvpn-routing" "WARNING: no VPN gateway provided, routing might not work properly!"
Code:
Chain FORWARD (policy ACCEPT 2725K packets, 2879M bytes)
pkts bytes target prot opt in out source destination
0 0 MARK udp -- any any anywhere anywhere udp dpt:5060 MARK xset 0x1/0x7
0 0 MARK tcp -- any any anywhere anywhere tcp dpt:5060 MARK xset 0x1/0x7
0 0 MARK all -- any br0 192.168.1.0/24 192.168.1.0/24 MARK xset 0x1/0x7