[asterisk-users] OT - How to simulate public IPs for lab testing
Olivier
oza_4h07 at yahoo.fr
Mon Apr 8 11:18:27 CDT 2013
2013/4/8 Johan Wilfer <lists at jttech.se>
> 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.)
>
Please, excuse me but I'm not sure I got your suggestion and I'm realizing
I didn't correctly describe my lab set up.
At the moment, the router between both servers provides Internet access to
server1.
That means it has one WAN interface eth0 which is "on server2 side" and one
eth1 LAN interface which is on server1 side.
Currently, this router do NAT translation for server1.
Having clarified my setup, I guess your advice is to :
1. add address 1.2.3.4 to router's eth0
2. add address 4.3.2.1 to server2 interface
3. configure router to route trafic to 4.3.2.1 using server2 private
address (such as "ip route add 4.3.2.1/24 via 192.168.1.25")
4. configure server to route trafic to 1.2.3.4 using router private address
Is this correct ?
>
> Good luck!
>
> --
> Johan Wilfer
>
> --
> ______________________________**______________________________**_________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
> http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/**mailman/listinfo/asterisk-**users<http://lists.digium.com/mailman/listinfo/asterisk-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130408/79f0871a/attachment.htm>
More information about the asterisk-users
mailing list