Find the answer to your Linux question:
Results 1 to 4 of 4
Here is my config: I have ZTE ADSL 2+ router that has 4 ATM PVC's configured, but only 2 of them are important for problem description: 1st PVC is 8/35 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    2

    ZTE Router, Internet (PPPoE) WAN port to SIP ATM PVC bridging


    Here is my config:

    I have ZTE ADSL 2+ router that has 4 ATM PVC's configured, but only 2 of them are important for problem description:

    1st PVC is 8/35 and is ATM PVC for internet (PPPoE).
    2nd PVC is 8/37 and is ATM PVC for voip.

    When DSL link is up, I can get IPs on this two PVC's, and as a result of ifconfig command for this 2 PVC's I have:

    ppp0 Link encap:Point-Point Protocol
    inet addr:46.161.106.7 P-t-P:195.66.160.18 Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
    RX packets:301298 errors:0 dropped:0 overruns:0 frame:0
    TX packets:186824 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3
    RX bytes:385395086 (367.5 MiB) TX bytes:14234288 (13.5 MiB)

    AND

    nbif2 Link encap:Ethernet HWaddr 98:F5:37:FC:19:B5
    inet addr:10.131.187.66 Bcast:10.131.255.255 Mask:255.254.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1492 Metric:1
    RX packets:6204 errors:0 dropped:0 overruns:0 frame:0
    TX packets:5815 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:1398266 (1.3 MiB) TX bytes:1298854 (1.2 MiB)

    Currently I can enter the nbif2 interface from LAN side (I added static route - 10.0.0.0/8 via 10.130.0.1 dev nbif2).

    My question is - how can I forward port (eg. port 1234) on ppp0 interface to nbif2 interface, so I can communicate from internet connect to SIP server that is on nbif2 network?

    I also attached picture of problem setup and available commands on the router.

    Thanks.
    Attached Images Attached Images

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You will need to turn on FORWARDing and setup IPTABLES to forward that port only to protect SIP.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jun 2012
    Posts
    2
    I already tried different IP tables commands but without success. Is it possible to forward and translate IP between two different interfaces using ip tables?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Yes.

    Code:
    iptables -t nat -A PREROUTING -i <inbound interface> -p tcp -d <external ip addr> --dport 1234 -j DNAT --to-destination <SIP server ip addr>

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •