1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Tomato and modem access to syslog server

Discussion in 'Tomato Firmware' started by NeoX, Dec 6, 2011.

  1. NeoX

    NeoX Addicted to LI Member

    Hi all!

    I have an ZyXEL modem connected on wan side of router.
    I've putted up modem ip address into Network->Basic->Route modem IP.
    Now, i can access my modem from LAN side. But i'd like to get my modem sending messages to my own LAN syslog server...
    How can i achieve this?
     
  2. Planiwa

    Planiwa LI Guru Member

    I can think of 2 direct ways to communicate modem data to a LAN host (including the router).

    1. The modem initiates a connection to the LAN host.
    2. The LAN host initiates a connection to the modem.

    #1 is more interesting, depending on modem capabilities. But no one has addressed the question.
    #2 is easy to do, if there is interest.
     
  3. NeoX

    NeoX Addicted to LI Member

    I was thinking about first option, because 2th is already achieved by tomato Route modem IP option.

    Could you help me with it? I have no idea even where to start looking for solution...
     
  4. ntest7

    ntest7 Network Guru Member

    I'll give some pointers for a starting place, you'll probably need to fiddle with this.

    The modem needs to know where to send the logs. My first guess is the WAN IP of your tomato router.

    Tomato will need a port forwarding from the modem src address to the internal syslog server (UDP port 514). My first guess for the src IP is the modem management IP.

    The syslog server will need to accept logs from the modem IP, probably the same IP you use as source in the port forwarding.

    The QOS Details page may help you find the right IPs to use, or you may need to add some iptables logging on the tomato router.
     
  5. NeoX

    NeoX Addicted to LI Member

    Of course i've tried your method already.
    But it won't work.
    I think it may be a problem with diffrent interface.
    PPP connection is on ppp0, and modem management connection is on vlan1.
    I'm not quite sure, but IPtables may work only on WAN interface - it's ppp0...
     
  6. ntest7

    ntest7 Network Guru Member

    Maybe next time you can share details of your connection and what you've already tried. Good Luck!
     
  7. Planiwa

    Planiwa LI Guru Member

    One place to start would be the modem's capabilities. Those might be documented in the modem's manual.

    Another place might be to ask what one wants to achieve, in terms of the kind of information one wants to monitor. A modem's log may only show events, such as loss of sync, resync, and line stats at time of sync. In addition, the modem can be queried about dozens of counts, measurements and states that may change frequently or not, depending on the condition of the line. Noise levels, error counts, bitloading, bitswaps.

    For example:
    Code:
    Mon Mar 12 13:38:27 EDT 2012
     
                                                                      Received    XMIT  >Reset  <15 Min  C  P                             
    Date Time Bt/Sync-Uptime Syncs  Limit SyncRate Atten SNRM OutPwr  FEC CRC HEC  F C H  F S P S  F S P S  D  D  Bins    Bits  CRC       
    0311_11:00 4/4 12:44:04 1 1040:5952 800:4032 24:40 10:15 12:19  0 26 10  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 187
    0311_15:25 4/4 17:09:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 26 10  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 029
    0311_18:20 4/4 20:04:04 1 1040:5952 800:4032 24:40 10:14 12:19  0 27 11  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 029
    0311_19:05 4/4 20:49:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 27 11  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 022
    0311_19:50 4/4 21:34:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 28 11  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 022
    0312_04:15 5/5 05:59:03 1 1040:5952 800:4032 24:40 10:15 12:19  0 29 12  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 022
    0312_06:40 5/5 08:24:03 1 1040:5952 800:4032 24:40 10:15 12:19  0 29 12  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 025
    0312_08:05 5/5 09:49:02 1 1040:5952 800:4032 24:40 10:14 12:19  0 29 12  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 234
    0312_12:40 5/5 14:24:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 29 13  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 234
    0312_13:25 5/5 15:09:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 30 14  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 234
     
    0312_13:35 5/5 15:19:03 1 1040:5952 800:4032 24:40 10:14 12:19  0 30 14  0 0 0  0 0 0 0  0 0 0 0  0 0  23:176 224:1108 234
     
     
    004        47        91      134      177      220      263      306      349      392      436      479      522      565    590        640        694        740    781      824      867
    0        1        0        1        2        3 |      4        5        6  |    7        8        9        10        1        2        3        4        5        6        7        8        9        20        1        2        3        4        5     
    1...5....0....5... 0....5....0....5....0....5....0.|..5....0....5....0....5....0...|5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5
    2012.0307_1850 042 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999888888888787777767777666666666545555555544334444344333434333333232222222222223222222222222222222222222222.22.2..2
    2012.0307_1855 047 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999888888888787777767777666666666545555555544334444344333434333333222222322222223222222222222222222222222222.22.2..2
    2012.0307_1900 042 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999888888888787777767777666666666545555555544334444344333434333333232222222222223222222222222222222222222222.22.2..2
    2012.0307_1905 008 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999888888888787777767777666666666645555555544334444344333434333333222222222222223222222222222222222222222222.22.2..2
    2012.0308_0740 229 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999888888888787777767777676666666645555555544334444344323434333333222222222222223222222222222222222222222222.22.2..2
    2012.0309_2210 187 .......479AABBCCCCBBBBAA999887........567889AAABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999988888888787777767777676666666645555555544234444344323434333333222222222222223222222222222222222222222222.22.2..2
    2012.0311_1525 029 .......479AABBCCCCBBBBAA999887........5678899AABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999988888888787777767777676666666655555555544234444344323434333333222222222222223222222222222222222222222222.22.2..2
    2012.0311_1905 022 .......479AABBCCCCBBBBAA999887........5678899AABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999988888888787777767777676666666655555555544234444344333434332333222222222222223222222222222222222222222222.22.2..2
    2012.0312_0640 025 .......479AABBCCCCBBBBAA999887........5678899AABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999988888888787777767777676666666655555555544234444344333434332233322222222222223222222222222222222222222222.22.2..2
    2012.0312_0805 234 .......479AABBCCCCBBBBAA999887........5678899AABBBBBBBBBBBBBBBBB.BBBBBBBBBBBBBBBBBBBBB2BBBBBA9A99999999999988888888787777767777776666666655555555544234444344333434332233222222222222223222222222222222222222222222.22.2..2
    004        47        91      134      177      220      263      306      349      392      436      479      522      565    590        640        694        740    781      824      867
    0        1        0        1        2        3 |      4        5        6  |    7        8        9        10        1        2        3        4        5        6        7        8        9        20        1        2        3        4        5     
    1...5....0....5... 0....5....0....5....0....5....0.|..5....0....5....0....5....0...|5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5....0....5
     
    2012.0307_0915  38:6\5 173:2/3
    2012.0307_1000  43:A\9 175:2/3
    2012.0307_1050  39:7\6 180:2/3
    2012.0307_1130  42:9\8 144:4/5
    2012.0307_1355  46:B\A 170:2/3
    2012.0307_1850 105:8/9 113:7/8 148:2/3 173:3\2 175:3\2 180:3\2
    2012.0307_1855 170:3\2 175:2/3
    2012.0307_1900 170:2/3 175:3\2
    2012.0307_1905 136:5/6 170:3\2
    2012.0308_0740 128:6/7 158:3\2
    2012.0309_2210 106:8/9 148:3\2
    2012.0311_1525  44:A\9 137:4/5
    2012.0311_1905 158:2/3 165:3\2
    2012.0312_0640 166:3\2 169:2/3
    2012.0312_0805 127:6/7 169:3\2 
    
    If one is really interested in understanding what is involved, one may want to explore the fact that while the modem maintains a single DSL connection, there may potentially be two PPPoE links on top of that DSL link.

    This may have some useful hints:
    http://www.linksysinfo.org/index.php?threads/setup-tomato-router-behind-a-dsl-modem-router.31108/

    I would certainly appreciate corrections to any errors in what I have written there. :)
     
  8. Daijoubu

    Daijoubu Serious Server Member

    Looking at /etc/services, syslogd have 514/udp, so that means it should be able to accept messages from a remote syslogd

    My modem is able to connect to a remote syslog on port 514, I'll do some testing and report back

    (Anecdote: the phone area code here in Montreal is also 514)
     

Share This Page