LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-01-2011, 10:26 AM   #1
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Rep: Reputation: 31
SNMP listen specific port help


Running ubuntu 10.04LTS and since this is running behind a loadbalacer on a single public IP, I wish to have a few servers run on other ports, ex.
server1 IP:161
server2 IP:162

and so on. I am running zenoss remotely, and I tried in the loadbalancer to move 162 to local 161 but the query from zenoss wants the 162 port (naturally), so I need to have snmpd listen on 162. Reading the doc's, the examples say use the -x ip : port, which I did. In ubuntu under /etc/default/snmpd I have the line to read;

SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -x 192.168.50.102:162'

A restart, PS shows;

snmp 7214 0.3 0.1 50156 5268 ? S 10:16 0:01 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid -x 192.168.50.102:162

These servers have 2 IP's, a private and loadbalanced, the .50 is on the loadbalanced, yet from a remote machine I can snmpwalk -v1 192.168.2.50 <enter> and get my info (:162 times out), so it's not using that config.

Any help is appreciated.
 
Old 07-01-2011, 10:53 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
In default snmptrapd listen on 162, let us clear do you want to send traps to Zenoss server? and check the output of netstat -pnl for which application bind with port 162
 
Old 07-01-2011, 11:04 AM   #3
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
Not sure on the terminology so reading in parallel with snmptraps, etc. but the zenoss server is in amazon's EC2 cloud with an elastic IP. I did make progress, but it's not working yet. I have the public IP in the load balancer, port 161 -> server 1 port 161. From the ec2 machine I can issue;
snmpwalk -v1 -c public public:161 and it works.

Now in Ubuntu, you need to remove the -x so the default now shows;
SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid 0.0.0.0:162'

From a local machine, if I issue
snmpwalk -v1 -c public public:161, it now fails, but
snmpwalk -v1 -c public public:162 works.


netstat -pnl confirms as well;
udp 0 0 0.0.0.0:162 0.0.0.0:* 11721/snmpd

But, I did add a 2nd virtual service on the public IP port 162 to that server port 162 and I get;
Timeout: No Response from public:162

I have ruled out firewall, so still debugging, so it does look like it's listening on 162 now. But as you said with snmptraps, could that be the problem? Since the single 161->161 worked, I would figure that's all you need to do.

Thanks for the response... .
 
Old 07-01-2011, 11:21 AM   #4
sir-lancealot
Member
 
Registered: Aug 2007
Posts: 346

Original Poster
Rep: Reputation: 31
Interesting, I moved the port from 162 to 163, updated the loadbalancer forwarder and things work! Thanks for the quick response again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 11:07 AM
MULTICAST address and port, socket listen only on port? jf.argentino Linux - Networking 2 03-09-2009 01:42 PM
VNC listen specific interface Shwick Linux - Server 5 12-07-2008 07:16 PM
[Enterprise Server 10] SNMP listen on ethernet address noir911 SUSE / openSUSE 1 08-31-2007 10:20 AM
Can SSH Telnet listen for specific IP? tikvah Linux - Security 2 01-19-2003 11:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration