837 as VOIP applications. Only asterisk will consume this interface for outgoing traffic
I managed to make my router connect into internet via VDSL via:
config device
option name 'br-lan'
option type 'bridge'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
config interface 'wan'
option device 'dsl0.835'
option proto 'pppoe'
option username '^USERNAME^'
option password '^PASSWORD^'
option ipv6 'none'
option keepalive '10'
option mtu '1492'
config interface voip
option device 'dsl0.837'
option proto 'dhcp'
But I am afaid that all my outgoing traffic from lan does not get redirected to wan interface. Therefore, I want to force any traffic comming from lan to use the wan interface for outgoint traffic. The wan interface uses pppoe and dynamic IP thereforer I cannot know apriori what ip ISP gives to me.
uci set network.lan.ip4table="1"
uci set network.voip.ip4table="2"
uci -q delete network.lan_voip
uci set network.lan_voip="rule"
uci set network.lan_voip.in="lan"
uci set network.lan_voip.dest="VOIP_DOMAIN_IP/32"
uci set network.lan_voip.lookup="2"
uci set network.lan_voip.priority="30000"
uci commit network
/etc/init.d/network restart
In these settings you provided, is the ^ASTERISK_IP^ is the vlan's IP range (the one that dsl0.837 retrieves from)?
Also, how I can use dns resolution for a specific address via using the dsl0.837 as well the address that I want to be resolved via this network interface is the ngn.hol.net one.
I am not running asterisk, VOIP is offered by the ISP in a sepoerate VLAN.
I want to connect a softphone to ISP's VOIP servers using that specific VLAN.
What I have is credentials and a connection domain and I want any connection from softphone/device such as https://www.ebay.com/itm/332802056514 to use the VLAN 837 from my LAN.
Both Vlans 835 and 837 are the ones that ISP uses.
Use custom routing tables and replace static routes with the rules:
uci -q delete network.voip.defaultroute
uci set network.lan.ip4table="1"
uci set network.voip.ip4table="2"
uci -q delete network.voip_dns
uci set network.voip_dns="rule"
uci set network.voip_dns.in="lan"
uci set network.voip_dns.dest="62.38.86.0/24"
uci set network.voip_dns.lookup="2"
uci set network.voip_dns.priority="30000"
uci commit network
/etc/init.d/network restart
I meant the reason why we select tables. What's the logic behind routing tables. I've looked upon https://openwrt.org/docs/guide-user/network/ip_rules and I fail to understand the rationale behind your settings.
I am looking more like the philosophy behind each line of configuration.