Hey Dave, Thanks for getting back to me. I figured it out not long before getting this message. Basically, I init-ed a session with net-snmp, then using the netsnmp_session thing that returned, I was able to burrow down to the socket that it used. I then just bind that to the port I wanted, and then went on and called the sync_response method etc. It seems to be working a treat - I can pick any local port and just do a bind() to that with the socket net-snmp gives (well sort of, it took me a while how to figure out how to get it). You are right about 161 :) My misake.
Anyway, thanks all, Cheers, Al On Friday, October 08, 2004, at 06:27PM, Dave Shield <[EMAIL PROTECTED]> wrote: >> I am hoping to be able to set up a firewall >> between the computer the code will be running on and an SNMP device. I >> therefore would like to be able to open just one port. The problem is >> that it seems the library chooses an arbitrary source port on the local >> computer > >Yes - that's fairly standard for most network services. >The port at one end of the connection will be fixed, >the other will be semi-random. > Any sensible firewall configuration should be able to >deal with this - allowing through traffic *to* that particular >port but not worrying about the source port. > >If there's only one management system that needs to use SNMP, >then you could set up a rule > > allow netman-host:* <-> agent:161 > > >> (I can specify the remote port, or leave it as default of 162 >> no worries). > >If you're talking about GET/SET requests, then you should be using >port 161. Port 162 is used for SNMP traps, not GET/SET requests. > >Dave > > > ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Net-snmp-users mailing list [EMAIL PROTECTED] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
