LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Which port is getting blocked by proxy? (https://www.linuxquestions.org/questions/linux-networking-3/which-port-is-getting-blocked-by-proxy-4175546315/)

plafratt 06-24-2015 10:20 AM

Which port is getting blocked by proxy?
 
I have a program that is trying to access a remote site through a particular port that is getting blocked by my organization's proxy. Is there an easy way to tell what port the program is trying to use?

Thanks,
Patrick

plafratt 06-24-2015 10:52 AM

I was able to get some information that looks somewhat useful by running the command "strace -f -e trace=network -s 10000 <program_name>". There is a line of output that says:

[pid 23229] recvfrom(3, "\0\265\201\203\0\1\0\0\0\1\0\0\4http\0\0\1\0\1\0\0\6\0\1\0\0\34\336\0@\1a\froot-servers\3net\0\5nstld\fverisign-grs\3com\0x\33i\200\0\0\7\10\0\0\3\204\0\t:\200\0\1Q\200", 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("127.0.1.1")}, [16]) = 97

Does anyone know what encoding is being used for the numbers there?

Thanks,
Patrick

jefro 06-24-2015 03:59 PM

I tend to just use wireshark and record a time frame.

http://chadfowler.com/blog/2014/01/2...gic-of-strace/

When you add to a post instead of edit, you make it appear like someone is helping by the way. Consider using edit for the first post in sequence. It will leave it as an 0 reply and keep it more on top.

plafratt 06-24-2015 04:17 PM

Thanks for the response.

Yes, someone else had recommended that I use Wireshark. I was hoping to find a way that didn't require root.

I had seen that tutorial on strace earlier today and skimmed it. I hadn't noticed an explanation of the encoded values in the arguments of the type shown in my original post.

Ok, thanks for the tip on editing. I will plan to do that in the future.

Thanks again.


All times are GMT -5. The time now is 10:57 PM.