Configure network interfaces for sip trunk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration:



iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252


And a SIP server with IP: 172.xxx.xxx.xxx



What I want to do is route all incoming trafic from my LAN that targets to my SIP server to it.



I was trying adding this to SIP interface



post-up ip route add [MySipServerIP] dev SIP src 192.168.1.0/24 table mgmt


Another try:



post-up ip route add [SIP ip] dev SIP src 192.168.1.0/24 table mgmt


What is the right way to set this route?










share|improve this question
























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – terdon
    Feb 17 at 13:52















2















I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration:



iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252


And a SIP server with IP: 172.xxx.xxx.xxx



What I want to do is route all incoming trafic from my LAN that targets to my SIP server to it.



I was trying adding this to SIP interface



post-up ip route add [MySipServerIP] dev SIP src 192.168.1.0/24 table mgmt


Another try:



post-up ip route add [SIP ip] dev SIP src 192.168.1.0/24 table mgmt


What is the right way to set this route?










share|improve this question
























  • Comments are not for extended discussion; this conversation has been moved to chat.

    – terdon
    Feb 17 at 13:52













2












2








2








I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration:



iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252


And a SIP server with IP: 172.xxx.xxx.xxx



What I want to do is route all incoming trafic from my LAN that targets to my SIP server to it.



I was trying adding this to SIP interface



post-up ip route add [MySipServerIP] dev SIP src 192.168.1.0/24 table mgmt


Another try:



post-up ip route add [SIP ip] dev SIP src 192.168.1.0/24 table mgmt


What is the right way to set this route?










share|improve this question
















I have a Debian 9.5 server that I'm trying to use as a PBX server with a sip trunk, this machine has two network interfaces, one pointing to LAN another one pointing to my sip provider. This is the configuration:



iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252


And a SIP server with IP: 172.xxx.xxx.xxx



What I want to do is route all incoming trafic from my LAN that targets to my SIP server to it.



I was trying adding this to SIP interface



post-up ip route add [MySipServerIP] dev SIP src 192.168.1.0/24 table mgmt


Another try:



post-up ip route add [SIP ip] dev SIP src 192.168.1.0/24 table mgmt


What is the right way to set this route?







networking routing sip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 12 at 14:48







Juan Pablo Gomez

















asked Feb 12 at 13:50









Juan Pablo GomezJuan Pablo Gomez

1217




1217












  • Comments are not for extended discussion; this conversation has been moved to chat.

    – terdon
    Feb 17 at 13:52

















  • Comments are not for extended discussion; this conversation has been moved to chat.

    – terdon
    Feb 17 at 13:52
















Comments are not for extended discussion; this conversation has been moved to chat.

– terdon
Feb 17 at 13:52





Comments are not for extended discussion; this conversation has been moved to chat.

– terdon
Feb 17 at 13:52










1 Answer
1






active

oldest

votes


















1














Well finally the work is done.



First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.



iface LAN inet static
address 192.168.1.247/24
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.xxx
netmask 255.255.255.252


Was modified to:



iface LAN inet static
address 192.168.1.247
netmask 255.255.255.0
gateway 192.168.1.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.254

allow-hotplug SIP
iface SIP inet static
address 172.xxx.xxx.IP
netmask 255.255.255.252


Then at /etc/rc.local must add two static routes




  1. This route sends all trafic to LAN through LAN interface



    route add 192.168.1.0 gw 192.168.1.254



  2. This route sends all traffic to my sip server through SIP interface



    route add [SIP SERVR IP] gw 172.xxx.xxx.GW


This all done the work.



Note:



172.xxx.xxx.IP is the Ip assigned by telecom provider



172.xxx.xxx.GW is the gateway assigned by telecom provider



[SIP SERVR IP] is the Sip server ip assigned by telecom provider.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500182%2fconfigure-network-interfaces-for-sip-trunk%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Well finally the work is done.



    First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.



    iface LAN inet static
    address 192.168.1.247/24
    gateway 192.168.1.254
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.1.254

    allow-hotplug SIP
    iface SIP inet static
    address 172.xxx.xxx.xxx
    netmask 255.255.255.252


    Was modified to:



    iface LAN inet static
    address 192.168.1.247
    netmask 255.255.255.0
    gateway 192.168.1.254
    # dns-* options are implemented by the resolvconf package, if installed
    dns-nameservers 192.168.1.254

    allow-hotplug SIP
    iface SIP inet static
    address 172.xxx.xxx.IP
    netmask 255.255.255.252


    Then at /etc/rc.local must add two static routes




    1. This route sends all trafic to LAN through LAN interface



      route add 192.168.1.0 gw 192.168.1.254



    2. This route sends all traffic to my sip server through SIP interface



      route add [SIP SERVR IP] gw 172.xxx.xxx.GW


    This all done the work.



    Note:



    172.xxx.xxx.IP is the Ip assigned by telecom provider



    172.xxx.xxx.GW is the gateway assigned by telecom provider



    [SIP SERVR IP] is the Sip server ip assigned by telecom provider.






    share|improve this answer



























      1














      Well finally the work is done.



      First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.



      iface LAN inet static
      address 192.168.1.247/24
      gateway 192.168.1.254
      # dns-* options are implemented by the resolvconf package, if installed
      dns-nameservers 192.168.1.254

      allow-hotplug SIP
      iface SIP inet static
      address 172.xxx.xxx.xxx
      netmask 255.255.255.252


      Was modified to:



      iface LAN inet static
      address 192.168.1.247
      netmask 255.255.255.0
      gateway 192.168.1.254
      # dns-* options are implemented by the resolvconf package, if installed
      dns-nameservers 192.168.1.254

      allow-hotplug SIP
      iface SIP inet static
      address 172.xxx.xxx.IP
      netmask 255.255.255.252


      Then at /etc/rc.local must add two static routes




      1. This route sends all trafic to LAN through LAN interface



        route add 192.168.1.0 gw 192.168.1.254



      2. This route sends all traffic to my sip server through SIP interface



        route add [SIP SERVR IP] gw 172.xxx.xxx.GW


      This all done the work.



      Note:



      172.xxx.xxx.IP is the Ip assigned by telecom provider



      172.xxx.xxx.GW is the gateway assigned by telecom provider



      [SIP SERVR IP] is the Sip server ip assigned by telecom provider.






      share|improve this answer

























        1












        1








        1







        Well finally the work is done.



        First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.



        iface LAN inet static
        address 192.168.1.247/24
        gateway 192.168.1.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.254

        allow-hotplug SIP
        iface SIP inet static
        address 172.xxx.xxx.xxx
        netmask 255.255.255.252


        Was modified to:



        iface LAN inet static
        address 192.168.1.247
        netmask 255.255.255.0
        gateway 192.168.1.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.254

        allow-hotplug SIP
        iface SIP inet static
        address 172.xxx.xxx.IP
        netmask 255.255.255.252


        Then at /etc/rc.local must add two static routes




        1. This route sends all trafic to LAN through LAN interface



          route add 192.168.1.0 gw 192.168.1.254



        2. This route sends all traffic to my sip server through SIP interface



          route add [SIP SERVR IP] gw 172.xxx.xxx.GW


        This all done the work.



        Note:



        172.xxx.xxx.IP is the Ip assigned by telecom provider



        172.xxx.xxx.GW is the gateway assigned by telecom provider



        [SIP SERVR IP] is the Sip server ip assigned by telecom provider.






        share|improve this answer













        Well finally the work is done.



        First: Interface LAN was configured by installer itself, then it add mask /24 that must be removed.



        iface LAN inet static
        address 192.168.1.247/24
        gateway 192.168.1.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.254

        allow-hotplug SIP
        iface SIP inet static
        address 172.xxx.xxx.xxx
        netmask 255.255.255.252


        Was modified to:



        iface LAN inet static
        address 192.168.1.247
        netmask 255.255.255.0
        gateway 192.168.1.254
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 192.168.1.254

        allow-hotplug SIP
        iface SIP inet static
        address 172.xxx.xxx.IP
        netmask 255.255.255.252


        Then at /etc/rc.local must add two static routes




        1. This route sends all trafic to LAN through LAN interface



          route add 192.168.1.0 gw 192.168.1.254



        2. This route sends all traffic to my sip server through SIP interface



          route add [SIP SERVR IP] gw 172.xxx.xxx.GW


        This all done the work.



        Note:



        172.xxx.xxx.IP is the Ip assigned by telecom provider



        172.xxx.xxx.GW is the gateway assigned by telecom provider



        [SIP SERVR IP] is the Sip server ip assigned by telecom provider.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 16 at 14:46









        Juan Pablo GomezJuan Pablo Gomez

        1217




        1217



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f500182%2fconfigure-network-interfaces-for-sip-trunk%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay