Can I send SNMP Traps to a different network? - snmp

I'm trying to send and receive an SNMP trap using an Ubuntu VM. Works well if I send and receive it in the same VM. But is it possible to send it to another Ubuntu VM in a different network or sending it through the internet?
Used a ton of tutorial like this but with no luck.
Any tutorials or guides for this? Been searching for days. Any help would be great. Thanks!

Yes, of course, but you will need to open up your firewalls and/or set up port forwarding so that the packets go where they need to go when they cross any network boundaries. The specific details depend on your network layout and cannot be further explained in the abstract.

Related

Programmable router

I'd like to set up a proxy between my home network and internet.
Currently computers at home connect to a cisco router which is connected to internet.
What I'd like is to set up system so that all internet traffic goes through a proxy - in my case it is a dedicated extra computer (server).
Are there programmable routers that can run some software within the router or using a connected computer?
This way I could use a program to see what goes out and comes in.
If you only want to monitor your network then investigate and learn how to use WireShark. If you want to take the long and much harder route of making a proxy server, use a squid proxy. It runs on a Linux server and you can get a lot of user friendly GUI's. Plus there are hundreds of tutorials.

SNMP v3 seems not working

I have an application in PHP(running on ubuntu) which executes some commands depending on some received traps. I have a windows test client to send traps and it works well for snmp v2. I check everything from the snmptrapd log. Unfortunately the client doesn't support v3 and I must use a real device. When I use a NoBreak which sends only v3 traps snmptrapd does nothing. In fact I can see these traps on my windows client, therefore some setup in linux appears to be missing. I've been reading net-snmp page and tutorials on the internet, but I'm not really sure about what to do, because I didn't configure any aspect of security in windows and it simply works.
If you go to net-snmp docs, it's said that we need to create a user and set a password, however the nobreak seems to send a kind of broadcast. Also I didn't receive instructions for setup(I'm not saying that I don't need to do so).
The first question is:
How can I listen to a port in order to check trap reception? Maybe it's arriving but not being processed.
The second question:
How can I configure snmptrapd to receive all v3 traps? Is that possible?
Net-SNMP's snmptrapd very much does handly SNMPv3 traps. But, it does so only after you've configured it. In fact, the it won't receive any traps over any version of the protocol unless you configure it. This is for security, since it is capable of running applications when a trap is received, etc. Imagine getting a fake trap that told you the machine across town was having an issue? You'd drive all the way over there just to find out someone had sent you a bugs trap because you were accepting and believing any message that came it's way.
To set up SNMPv3 for snmptrapd, you might start with this tutorial in particular: SNMPv3 Traps

Sending Packets Using TCP/IP to Use in XCode

I'm very new to network programming, and would appreciate some help understanding what some good progress steps would be. I am designing an iOS app that requires real-time information to be delivered over a network from another machine. I know the IP address of this machine, as well as the API that the machine adheres to in terms of sending and receiving messages.
From doing some research, it seems like I need to open up a socket on one of the machine's ports, and open up another socket on my computer, and then use TCP/IP to send and receive packets between the two.
What is a good overview of the process that I need to do at this point? Which languages and environments would you suggest that would be most efficient for me to be able to get the information I need from this machine into my XCode project?
Thanks! Any help would be appreciated.
you just need to look for examples of how to do "socket programming" for IOS. here's one resource:
http://www.tekritisoftware.com/sites/default/files/Socket_Programing_for_IOS.pdf

How to send an snmp request to any computer on LAN?

I want to build an application using snmp for searching my LAN and exploring the devices which have shared some resources. I need some assistance to start with it, I have trying to do the same using net-snmp, but still no success.
SNMP is on UDP, so you can simply do a broadcast.
It is quite normal that net-snmp times out in such cases, as no SNMP agent would like to respond to you or no SNMP agent is there in the same LAN.

How can I see my HTTP posts?

I'm trying to send http Post requests from a embedded device.
Is there any service I can use to send test POSTs to and see what my requests look like? Or is there any "test-webserver" I can install on my PC that dumps Http posts in a raw format?
Thanks!
Requestbin does exactly what you need.
I would say that one of the best ways of doing this would be setting up an ad-hoc wireless network and then track the traffic via Wireshark or Fiddler. You can connect the phone to the shared network and then specifically "sniff" the wireless traffic (given that the PC is connected to a wired network).
Example for Windows Phone 7:
http://dennisdel.com/?p=611
You could also try PutsReq. It is similar to RequestBin, but it is open source and you can also simulate responses and forward requests.

Resources