The pfSense Store

Author Topic: [solved]receiving telegrams over TCP/IP  (Read 165 times)

0 Members and 1 Guest are viewing this topic.

Offline alivdel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
[solved]receiving telegrams over TCP/IP
« on: January 12, 2018, 03:29:56 am »
hi all,

i want to know, if i send a message over TCP through for example lan1 from my compute on Gateway pfsense, where or how can i see the message.
i want to send some commands remotely over TCP.

thanks.
« Last Edit: January 15, 2018, 10:31:43 am by alivdel »

Online KOM

  • Hero Member
  • *****
  • Posts: 5511
  • Karma: +681/-23
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #1 on: January 12, 2018, 08:58:06 am »
Huh??  ???

Traffic is point-to-point usually.  If you want to read the message, you either need to be the receiver, or you need to intercept the traffic on its way to destination.

Offline alivdel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #2 on: January 12, 2018, 09:22:54 am »
Huh??  ???

Traffic is point-to-point usually.  If you want to read the message, you either need to be the receiver, or you need to intercept the traffic on its way to destination.

thanks for reply, maybe i didnt explain well, i want to send a command from my Computer to another System which is a Gateway device. two Systems are connected via Lan, i can ping between them. now my question is if i send a command through TCP from my Computer to another System (My pfsense Gateway) how and where can i see the command.

Online KOM

  • Hero Member
  • *****
  • Posts: 5511
  • Karma: +681/-23
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #3 on: January 12, 2018, 09:45:35 am »
You're still not very clear.

If you send a command to a computer over TCP, then you need a listener of some type on the destination computer to accept and process the message.  I can't be more specific since you're only providing vague information.

What EXACTLY are you trying to do??  When you say 'telegrams', are you referring to the app Telegram Messenger?  Are you asking how to intercept Telegram messages between other users on your network?

Offline alivdel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #4 on: January 15, 2018, 01:29:21 am »
You're still not very clear.

If you send a command to a computer over TCP, then you need a listener of some type on the destination computer to accept and process the message.  I can't be more specific since you're only providing vague information.

What EXACTLY are you trying to do??  When you say 'telegrams', are you referring to the app Telegram Messenger?  Are you asking how to intercept Telegram messages between other users on your network?

thanks again KOM, i was not at Office thats why i saw your message today.
i want to execute a Shell script with some Parameters in my second System (Gateway) from first System (my Computer). i want to do it with sending a command over TCP/IP, i dont know is it possible, if ya how can i do it.

Offline jahonix

  • Hero Member
  • *****
  • Posts: 2502
  • Karma: +150/-16
  • volunteer since 2006
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #5 on: January 15, 2018, 05:39:30 am »
That's a telnet or ssh session to your gateway.
Chris

The issue with IPv6 jokes is that almost no one understands them and no one is using them yet.

Online KOM

  • Hero Member
  • *****
  • Posts: 5511
  • Karma: +681/-23
    • View Profile
Re: receiving telegrams over TCP/IP
« Reply #6 on: January 15, 2018, 08:23:56 am »
Quote
i dont know is it possible, if ya how can i do it.

I don't know.  That looks more like a development question, not pfSense specific, and it may be outside the scope of these forums.

Offline alivdel

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [solved]receiving telegrams over TCP/IP
« Reply #7 on: January 15, 2018, 10:31:09 am »
Quote
i dont know is it possible, if ya how can i do it.

I don't know.  That looks more like a development question, not pfSense specific, and it may be outside the scope of these forums.

thanks, i solved the Problem. there is two solution:
1) i could use tcpdump to see all the traffic including data which i send from my Computer.
2) using tcp socket

finally i choosed second way, wrote a tcp socket as Server in c and execute it from console. Now i can send commands through tcp to second System (my Gateway) with some Parameters and execute the Shell script with These parameters.