Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-01-2011, 10:26 AM
|
#1
|
Member
Registered: Aug 2007
Posts: 346
Rep:
|
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.
|
|
|
07-01-2011, 10:53 AM
|
#2
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep:
|
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
|
|
|
07-01-2011, 11:04 AM
|
#3
|
Member
Registered: Aug 2007
Posts: 346
Original Poster
Rep:
|
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... .
|
|
|
07-01-2011, 11:21 AM
|
#4
|
Member
Registered: Aug 2007
Posts: 346
Original Poster
Rep:
|
Interesting, I moved the port from 162 to 163, updated the loadbalancer forwarder and things work! Thanks for the quick response again.
|
|
|
All times are GMT -5. The time now is 04:51 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|