[asterisk-users] OT - How to simulate public IPs for lab testing

Johan Wilfer lists at jttech.se
Mon Apr 8 10:13:26 CDT 2013

2013-04-08 16:36, Olivier skrev:
> Hello,
> Many times, I need to test in a lab Asterisk servers before sending them
> to customer locations.
> I'm currently having trouble to test SIP trunks without touching SIP
> configuration.
> So, how should I change my testing lab so that I could now test SIP
> trunks without modifying Asterisk server under test ?
> A typical set up is:
> Asterisk server1 under test <---SIP----> Router <----- SIP ----> Lab's
> Asterisk  server2
> All machines (server1, router and server2) have Internet access.
> Router and server2 have a private address.
> Ideally, router should get customer's public adress (eg,
> server2 should also get my ITSP public address (eg and both
> machines should route trafic to each other without leaving my LAN and
> using Internet access.
> What would you suggest ?

I often configure a router to do NAT in these cases. You can do NAT even 
with a public net on the inside. Configure the temporary router with the 
IP of the customers router for the inside, and make it a dhcp client (or 
whatever you use) in your LAN for the outside interface.

You can make a route in your router to your ITSP-gw like this :
route add -host dev eth0

This means all traffic to will go to dev eth0 on your router.
(The device in your network with the ip also needs to have a 
route back to your router for replies.)

Good luck!

Johan Wilfer

More information about the asterisk-users mailing list