Jun-20-2021, 02:44 PM
Hello ,
I want to build my own syslog server
I have created a simple Udp server :
how can I get the IP
*** up until now I have used Splunk(I don't need ot because it have to much on it - and i just need simple things ) , and with the same error message it does show my the remote\client\sender IP
so I guss it is posiable to get
Thanks ,
I want to build my own syslog server
I have created a simple Udp server :
import logging import socket if __name__ == '__main__': UDP_IP = "10.0.0.111" UDP_PORT = 5005 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind((UDP_IP, UDP_PORT)) while True: data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes print("From: %s received message: %s" % (addr, data))when the message is comming I can see this :
From: ('10.0.0.1', 42060) received message: b'script,error this is error test message'now the '10.0.0.1' IP is the IP of my router and not from the computer how is sending this message
how can I get the IP
*** up until now I have used Splunk(I don't need ot because it have to much on it - and i just need simple things ) , and with the same error message it does show my the remote\client\sender IP
so I guss it is posiable to get
Thanks ,