Olivier
2013-Apr-08 14:36 UTC
[asterisk-users] OT - How to simulate public IPs for lab testing
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 1.2.3.4), server2 should also get my ITSP public address (eg 4.3.2.1) and both machines should route trafic to each other without leaving my LAN and using Internet access. What would you suggest ? Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130408/b36c8ee2/attachment.htm>
Johan Wilfer
2013-Apr-08 15:13 UTC
[asterisk-users] OT - How to simulate public IPs for lab testing
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 1.2.3.4), > server2 should also get my ITSP public address (eg 4.3.2.1) 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 4.3.2.1 dev eth0 This means all traffic to 4.3.2.1 will go to dev eth0 on your router. (The device in your network with the ip 4.3.2.1 also needs to have a route back to your router for replies.) Good luck! -- Johan Wilfer