[asterisk-users] Slightly OT: trying to mangle packets from Asterisk for a multiple ISP setup (reward)

Jeff LaCoursiere jeff at jeff.net
Tue Jun 1 10:27:02 CDT 2010


On Tue, 1 Jun 2010, Mike wrote:

> Thanks Joe,
> 
> They are on different segments.  Those two NICs share nothing but the
> server.
> 
> But more to the point, it doesn't explain why a simple routing rule matching
> the destination by IP address works wonderfully, but not one where I match a
> fwmark that has been set (apparently correctly according to my logging) with
> iptables.
> 
> Mike

Is this the same thread about having multiple ISP's, and you have external 
phones hitting the asterisk server on one or the other, and you want the 
replies to come back on the same segment they came in on?

I think IP mangling is making it way too complicated.  I suggested you front 
each segment with a NAT router.  Unless you are expecting very heavy traffic 
volumes, even a cheapo $50 router from Officemax should suffice.

Create two internal subnets - one for each interface. Set each router in 
"DMZ" mode, so it will send all inbound traffic to the asterisk server on 
the appropriate interface.  The asterisk server will then think that the 
connection is coming from a locally attached phone, and it will respond 
out the correct NIC, using the correct IP.  The NAT router will send it 
back out the right Internet connection using the appropriate public IP.

j




More information about the asterisk-users mailing list