Hi,
I install and configure mwan3 and all works good.
Now, I'm going to configure a specific rule. What I want is that all traffic for a specific site address (destionation-address.com) use just wan1.
I read the tutorial and create a rule in /etc/dnsmasq.conf:
Hi thank you for answer.
This are the outputs:
ip rule show
0: from all lookup 128
1: from all lookup local
1001: from all iif eth0.2 lookup main
1002: from all iif wlan0 lookup main
2001: from all fwmark 0x100/0xff00 lookup 1
2002: from all fwmark 0x200/0xff00 lookup 2
2253: from all fwmark 0xfd00/0xff00 blackhole
2254: from all fwmark 0xfe00/0xff00 unreachable
32766: from all lookup main
32767: from all lookup default
ip route show table all
default via 192.168.1.1 dev eth0.2 table 1
default via 192.168.0.1 dev wlan0 table 2
default via 192.168.0.1 dev wlan0 proto static src 192.168.0.100
default via 192.168.1.1 dev eth0.2 proto static src 192.168.1.13 metric 10
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.100
192.168.0.1 dev wlan0 proto static scope link src 192.168.0.100
192.168.1.0/24 dev eth0.2 proto static scope link metric 10
192.168.1.1 dev eth0.2 proto static scope link src 192.168.1.13 metric 10
192.168.2.0/24 dev br-lan proto kernel scope link src 192.168.2.1
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.0.0 dev wlan0 table local proto kernel scope link src 192.168.0.100
local 192.168.0.100 dev wlan0 table local proto kernel scope host src 192.168.0.100
broadcast 192.168.0.255 dev wlan0 table local proto kernel scope link src 192.168.0.100
broadcast 192.168.1.0 dev eth0.2 table local proto kernel scope link src 192.168.1.13
local 192.168.1.13 dev eth0.2 table local proto kernel scope host src 192.168.1.13
broadcast 192.168.1.255 dev eth0.2 table local proto kernel scope link src 192.168.1.13
broadcast 192.168.2.0 dev br-lan table local proto kernel scope link src 192.168.2.1
local 192.168.2.1 dev br-lan table local proto kernel scope host src 192.168.2.1
broadcast 192.168.2.255 dev br-lan table local proto kernel scope link src 192.168.2.1
unreachable default dev lo table unspec proto kernel metric 4294967295 error -128
fd06:92e0:4336::/64 dev br-lan proto static metric 1024
unreachable fd06:92e0:4336::/48 dev lo proto static metric 2147483647 error -128
fe80::/64 dev eth0 proto kernel metric 256
fe80::/64 dev br-lan proto kernel metric 256
fe80::/64 dev eth0.2 proto kernel metric 256
fe80::/64 dev wlan0 proto kernel metric 256
unreachable default dev lo table unspec proto kernel metric 4294967295 error -128
local ::1 dev lo table local proto none metric 0
local fd06:92e0:4336:: dev lo table local proto none metric 0
local fd06:92e0:4336::1 dev lo table local proto none metric 0
local fe80:: dev lo table local proto none metric 0
local fe80:: dev lo table local proto none metric 0
local fe80:: dev lo table local proto none metric 0
local fe80:: dev lo table local proto none metric 0
local fe80::b248:7aff:fedb:9301 dev lo table local proto none metric 0
local fe80::b248:7aff:fedb:9301 dev lo table local proto none metric 0
local fe80::b248:7aff:fedb:9301 dev lo table local proto none metric 0
local fe80::b248:7aff:fedb:9302 dev lo table local proto none metric 0
ff00::/8 dev br-lan table local metric 256
ff00::/8 dev eth0 table local metric 256
ff00::/8 dev eth0.2 table local metric 256
ff00::/8 dev wlan0 table local metric 256
unreachable default dev lo table unspec proto kernel metric 4294967295 error -128
mwan3 status
Interface status:
interface wan is online (tracking active)
interface wwan is online (tracking active)
Policy balanced:
wwan (50%)
wan (50%)
Policy wan1only:
wan (100%)
Policy wan2_only:
unreachable
Policy wan2_wan:
wan (100%)
Policy wan_only:
wan (100%)
Policy wan_wan2:
wan (100%)
Known networks:
224.0.0.0/3
192.168.0.0
192.168.2.0
192.168.2.255
192.168.0.1
192.168.0.100
127.0.0.0
127.0.0.0/8
192.168.1.255
192.168.0.0/24
192.168.1.1
127.0.0.1
192.168.1.0
192.168.2.1
192.168.1.0/24
192.168.2.0/24
127.255.255.255
192.168.0.255
192.168.1.13
Active rules:
0 0 - wan1only tcp -- * * 0.0.0.0/0 0.0.0.0/0 match-set myipset dst multiport sports 0:65535 multiport dports 0:65535
174 14932 - balanced all -- * * 0.0.0.0/0 0.0.0.0/0
No, but we'll debug it.
What is name and IP of interface wan1(mwan3)? I suppose, eth0.2 192.168.1.1?
Please, give output of iptables -S -t mangle
We should see your ipset and marking packets in output.
Ok but if with a pc connected to openwrt router I try to access the url it is unreachable (because it is reacheable only with wan1) so I think it goes on wan2...
Run traceroute (or tracert in Windows) from PC, check IP's of sites initially. Does PC use the same DNS? Check also traceroute by IP. Also disable wan2 (leaving only wan1) and check, whether site works.
ping -c 1 -I eth0.1 10.161.xxx.xx
PING 10.161.xxx.xx (10.161.xxx.xx): 56 data bytes
^C
--- 10.161.xxx.xx ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# ping -c 1 -I wlan0 10.161.xxx.xx
PING 10.161.xxx.xx (10.161.xxx.xx): 56 data bytes
64 bytes from 10.161.xxx.xx: seq=0 ttl=64 time=58.170 ms
--- 10.161.xxx.xx ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 58.170/58.170/58.170 ms
10.161.xxx.xxis an IP only reachable by the wan2! but why it use wan2??
It Is possible a DNS problem? Because wan1 and wan2 use differents DNS. Wan1 use 8.8.8.8 but with Wan2 I can't use it I must use a different one because it is behind a proxy
Ok I try to explain what is my configuration.
I have eth0.2 as wan1 in mwan3 and it is a normal ADSL line. I also have wlan0 as wan2 in mwan3 and it is a WiFi LTE router but the SIM is a company SIM so it is behind proxy.
What I need is just when I request some specific URL I want to use just eth0.2 aka wan1.