Stefan Reuter
2005-Jan-27 02:57 UTC
[Asterisk-Users] Asterisk chooses invalid outgoing interface (IAX2, virtual interfaces)
Hi, i have an asterisk box with two external ip addresses (say 1.2.3.4 on eth0 and 1.2.3.5 on eth0:1) and one "internal" vpn ip address (say 10.0.0.1 on tun0) The problem is: when a client conntects via iax to 1.2.3.4, the asterisk server responds on 1.2.3.5 and the packets are not accepted by the client. I can kinda fix this by using the bindaddr option, but then i can't accept calls on tun0. IMHO the asterisk responses should always be sent from the ip the request was received on. Any ideas on how to fix this? Stefan
Rich Adamson
2005-Jan-27 05:14 UTC
[Asterisk-Users] Asterisk chooses invalid outgoing interface (IAX2, virtual interfaces)
> i have an asterisk box with two external ip addresses (say 1.2.3.4 on > eth0 and 1.2.3.5 on eth0:1) and one "internal" vpn ip address (say > 10.0.0.1 on tun0) > > The problem is: > when a client conntects via iax to 1.2.3.4, the asterisk server responds > on 1.2.3.5 and the packets are not accepted by the client. > I can kinda fix this by using the bindaddr option, but then i can't > accept calls on tun0. > IMHO the asterisk responses should always be sent from the ip the > request was received on. > > Any ideas on how to fix this?Its a misunderstanding of how packets are handled on your system. Packets are _not_ sent on an interface just because it arrived on that interface. The packets are sent based on your routing table (netstat -rn) entries. If your system does not specifically know how to reach the destination, the packet is sent on the default route. Try adding route statements to your system to define each network accessible via each interface, and ensure a single default route points to your catch-all (eg, Internet) interface.
Possibly Parallel Threads
- ipv6 dialup: "nd6_lookup: failed to lookup" problem (4.8-REL)
- issue with tinc and libvirt / Network is already in use by interface tun0
- AW: issue with tinc and libvirt / Network is already in use by interface tun0
- Help linking subnets
- Changing interface based on network availability