Re: [CentOS] testing a udp socket with netcat

2012-03-19 Thread Foster, Rilindo (Contractor)
Arif,

You would want to run tcpdump (or some other sniffer() on the host server, so 
that you can confirm that there is two-way traffic. If tcpdump on the host 
server does not show any traffic from your client, something is blocking 
inbound. If you see traffic coming into the server, but nothing returning, you 
probably have issues around OSI layers 5-7. If you see a response, but you did 
not see from your client, then it may something blocking return traffic.

- Rilindo 


-Original Message-
From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On Behalf Of 
Arif Hossain
Sent: Wednesday, March 14, 2012 8:25 AM
To: centos@centos.org
Subject: [CentOS] testing a udp socket with netcat

i've this udp daemon which is waiting for an incoming udp datagram. now i want 
test this daemon for random garbage to test how it behaves. My udp daemon is 
running because its shows on netstat. problem is if i issue following command 
for putting udp datagram :
$nc -uvvz host port

it does not output any thing. i have straced the udp daemon. which does not 
returns from recv() call. 

my goal is to put arbitrary data on the udp socket by netcat. i do not have any 
experience regarding netcat so i'm asking if anyone can help me out with this.

thanks in advance.

--
You have a voice
The King's Speech

Public Key : $ gpg --keyserver keyserver.ubuntu.com --recv-key C88CFC23

This message, including any attachments, is the property of Sears Holdings 
Corporation and/or one of its subsidiaries. It is confidential and may contain 
proprietary or legally privileged information. If you are not the intended 
recipient, please delete it without reading the contents. Thank you.
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-15 Thread Cliff Pratt
On Thu, Mar 15, 2012 at 3:56 AM, Arif Hossain freefall1...@gmail.com wrote:
 On Wed, 2012-03-14 at 14:11 +, Giles Coochey wrote:
 --ms00020507030501060609
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: quoted-printable

 On 14/03/2012 13:59, Arif Hossain wrote:
  On Wed, 2012-03-14 at 08:37 -0500, Les Mikesell wrote:
  On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossainfreefall1...@gmail.com =
  wrote:
  i've this udp daemon which is waiting for an incoming udp datagram. n=
 ow
  i want test this daemon for random garbage to test how it behaves. My=

  udp daemon is running because its shows on netstat. problem is if i
  issue following command for putting udp datagram :
  $nc -uvvzhost  port
 
  it does not output any thing. i have straced the udp daemon. which do=
 es
  not returns from recv() call.
 
  my goal is to ppience regarding netcat so i'm asking if anyone can he=
 lp me
  out with this.
  Do you have iptables running?   The default config would probably
  block your udp traffic.
 
  here is my iptable-rules
 
  # Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
  *mangle
  :PREROUTING ACCEPT [329554:95268521]
  :INPUT ACCEPT [88918:46924677]
  :FORWARD ACCEPT [0:0]
  :OUTPUT ACCEPT [7296:1924138]
  :POSTROUTING ACCEPT [7296:1924138]
  COMMIT
  # Completed on Wed Mar 14 19:58:13 2012
  # Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
  *filter
  :INPUT ACCEPT [0:0]
  :FORWARD ACCEPT [0:0]
  :OUTPUT ACCEPT [206514:24743648]
  -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  -A INPUT -p icmp -j ACCEPT
  -A INPUT -i lo -j ACCEPT
  -A INPUT -p tcp -m state --state NEW -m tcp --dportport  -j ACCEPT
  -A INPUT -j REJECT --reject-with icmp-host-prohibited
  -A FORWARD -j REJECT --reject-with icmp-host-prohibited
  COMMIT
  # Completed on Wed Mar 14 19:58:13 2012
 
 And your INPUT chain rejects everything that is not matched by those=20
 lines above it.

 You'll need a:

 -A INPUT -p udp --dport port -j ACCEPT in there before you go to REJECT=
 =2E

 --=20
 Best Regards,

 for testing purpose i have flushed all rules in iptables -t filter

 $iptables -t filter --flush

 but still if try putting data by nc:

 $nc -uvv localhost 7160

 outputs :

 write error: connection refused.

Is the UDP daemon listening on 127.0.0.1 (localhost)?

Cheers,

Cliff
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] testing a udp socket with netcat

2012-03-14 Thread Arif Hossain
i've this udp daemon which is waiting for an incoming udp datagram. now
i want test this daemon for random garbage to test how it behaves. My
udp daemon is running because its shows on netstat. problem is if i
issue following command for putting udp datagram :
$nc -uvvz host port

it does not output any thing. i have straced the udp daemon. which does
not returns from recv() call. 

my goal is to put arbitrary data on the udp socket by netcat. i do not
have any experience regarding netcat so i'm asking if anyone can help me
out with this.

thanks in advance.

-- 
You have a voice
The King's Speech

Public Key : $ gpg --keyserver keyserver.ubuntu.com --recv-key C88CFC23


signature.asc
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-14 Thread Les Mikesell
On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossain freefall1...@gmail.com wrote:
 i've this udp daemon which is waiting for an incoming udp datagram. now
 i want test this daemon for random garbage to test how it behaves. My
 udp daemon is running because its shows on netstat. problem is if i
 issue following command for putting udp datagram :
 $nc -uvvz host port

 it does not output any thing. i have straced the udp daemon. which does
 not returns from recv() call.

 my goal is to put arbitrary data on the udp socket by netcat. i do not
 have any experience regarding netcat so i'm asking if anyone can help me
 out with this.

Do you have iptables running?   The default config would probably
block your udp traffic.

-- 
   Les Mikesell
 lesmikes...@gmail.com
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-14 Thread Arif Hossain
On Wed, 2012-03-14 at 08:37 -0500, Les Mikesell wrote:
 On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossain freefall1...@gmail.com wrote:
  i've this udp daemon which is waiting for an incoming udp datagram. now
  i want test this daemon for random garbage to test how it behaves. My
  udp daemon is running because its shows on netstat. problem is if i
  issue following command for putting udp datagram :
  $nc -uvvz host port
 
  it does not output any thing. i have straced the udp daemon. which does
  not returns from recv() call.
 
  my goal is to ppience regarding netcat so i'm asking if anyone can help me
  out with this.
 
 Do you have iptables running?   The default config would probably
 block your udp traffic.
 

here is my iptable-rules

# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*mangle
:PREROUTING ACCEPT [329554:95268521]
:INPUT ACCEPT [88918:46924677]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7296:1924138]
:POSTROUTING ACCEPT [7296:1924138]
COMMIT
# Completed on Wed Mar 14 19:58:13 2012
# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [206514:24743648]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT 
-A INPUT -p icmp -j ACCEPT 
-A INPUT -i lo -j ACCEPT 
-A INPUT -p tcp -m state --state NEW -m tcp --dport port -j ACCEPT 
-A INPUT -j REJECT --reject-with icmp-host-prohibited 
-A FORWARD -j REJECT --reject-with icmp-host-prohibited 
COMMIT
# Completed on Wed Mar 14 19:58:13 2012


-- 
You have a voice
The King's Speech

Public Key : $ gpg --keyserver keyserver.ubuntu.com --recv-key C88CFC23


signature.asc
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-14 Thread Giles Coochey

On 14/03/2012 13:59, Arif Hossain wrote:

On Wed, 2012-03-14 at 08:37 -0500, Les Mikesell wrote:

On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossainfreefall1...@gmail.com  wrote:

i've this udp daemon which is waiting for an incoming udp datagram. now
i want test this daemon for random garbage to test how it behaves. My
udp daemon is running because its shows on netstat. problem is if i
issue following command for putting udp datagram :
$nc -uvvzhost  port

it does not output any thing. i have straced the udp daemon. which does
not returns from recv() call.

my goal is to ppience regarding netcat so i'm asking if anyone can help me
out with this.

Do you have iptables running?   The default config would probably
block your udp traffic.


here is my iptable-rules

# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*mangle
:PREROUTING ACCEPT [329554:95268521]
:INPUT ACCEPT [88918:46924677]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7296:1924138]
:POSTROUTING ACCEPT [7296:1924138]
COMMIT
# Completed on Wed Mar 14 19:58:13 2012
# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [206514:24743648]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dportport  -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Mar 14 19:58:13 2012

And your INPUT chain rejects everything that is not matched by those 
lines above it.


You'll need a:

-A INPUT -p udp --dport port -j ACCEPT in there before you go to REJECT.

--
Best Regards,

Giles Coochey
NetSecSpec Ltd
UK Mobile: +44 7983 877 438
Business Email: giles.cooc...@netsecspec.co.uk
Email/MSN/Live Messenger: gi...@coochey.net
Skype: gilescoochey


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-14 Thread Arif Hossain
On Wed, 2012-03-14 at 14:11 +, Giles Coochey wrote:
 --ms00020507030501060609
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: quoted-printable
 
 On 14/03/2012 13:59, Arif Hossain wrote:
  On Wed, 2012-03-14 at 08:37 -0500, Les Mikesell wrote:
  On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossainfreefall1...@gmail.com =
  wrote:
  i've this udp daemon which is waiting for an incoming udp datagram. n=
 ow
  i want test this daemon for random garbage to test how it behaves. My=
 
  udp daemon is running because its shows on netstat. problem is if i
  issue following command for putting udp datagram :
  $nc -uvvzhost  port
 
  it does not output any thing. i have straced the udp daemon. which do=
 es
  not returns from recv() call.
 
  my goal is to ppience regarding netcat so i'm asking if anyone can he=
 lp me
  out with this.
  Do you have iptables running?   The default config would probably
  block your udp traffic.
 
  here is my iptable-rules
 
  # Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
  *mangle
  :PREROUTING ACCEPT [329554:95268521]
  :INPUT ACCEPT [88918:46924677]
  :FORWARD ACCEPT [0:0]
  :OUTPUT ACCEPT [7296:1924138]
  :POSTROUTING ACCEPT [7296:1924138]
  COMMIT
  # Completed on Wed Mar 14 19:58:13 2012
  # Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
  *filter
  :INPUT ACCEPT [0:0]
  :FORWARD ACCEPT [0:0]
  :OUTPUT ACCEPT [206514:24743648]
  -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
  -A INPUT -p icmp -j ACCEPT
  -A INPUT -i lo -j ACCEPT
  -A INPUT -p tcp -m state --state NEW -m tcp --dportport  -j ACCEPT
  -A INPUT -j REJECT --reject-with icmp-host-prohibited
  -A FORWARD -j REJECT --reject-with icmp-host-prohibited
  COMMIT
  # Completed on Wed Mar 14 19:58:13 2012
 
 And your INPUT chain rejects everything that is not matched by those=20
 lines above it.
 
 You'll need a:
 
 -A INPUT -p udp --dport port -j ACCEPT in there before you go to REJECT=
 =2E
 
 --=20
 Best Regards,

for testing purpose i have flushed all rules in iptables -t filter

$iptables -t filter --flush

but still if try putting data by nc:

$nc -uvv localhost 7160

outputs :

write error: connection refused. 

 

 Giles Coochey
 NetSecSpec Ltd
 UK Mobile: +44 7983 877 438
 Business Email: giles.cooc...@netsecspec.co.uk
 Email/MSN/Live Messenger: gi...@coochey.net
 Skype: gilescoochey
 
 
 
 --ms00020507030501060609--
 ___
 CentOS mailing list
 CentOS@centos.org
 http://lists.centos.org/mailman/listinfo/centos




signature.asc
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] testing a udp socket with netcat

2012-03-14 Thread Giles Coochey

On 14/03/2012 14:56, Arif Hossain wrote:

On Wed, 2012-03-14 at 14:11 +, Giles Coochey wrote:

--ms00020507030501060609
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

On 14/03/2012 13:59, Arif Hossain wrote:

On Wed, 2012-03-14 at 08:37 -0500, Les Mikesell wrote:

On Wed, Mar 14, 2012 at 8:25 AM, Arif Hossainfreefall1...@gmail.com  =

  wrote:

i've this udp daemon which is waiting for an incoming udp datagram. n=

ow

i want test this daemon for random garbage to test how it behaves. My=
udp daemon is running because its shows on netstat. problem is if i
issue following command for putting udp datagram :
$nc -uvvzhost   port

it does not output any thing. i have straced the udp daemon. which do=

es

not returns from recv() call.

my goal is to ppience regarding netcat so i'm asking if anyone can he=

lp me

out with this.

Do you have iptables running?   The default config would probably
block your udp traffic.


here is my iptable-rules

# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*mangle
:PREROUTING ACCEPT [329554:95268521]
:INPUT ACCEPT [88918:46924677]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7296:1924138]
:POSTROUTING ACCEPT [7296:1924138]
COMMIT
# Completed on Wed Mar 14 19:58:13 2012
# Generated by iptables-save v1.4.7 on Wed Mar 14 19:58:13 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [206514:24743648]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dportport   -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Wed Mar 14 19:58:13 2012


And your INPUT chain rejects everything that is not matched by those=20
lines above it.

You'll need a:

-A INPUT -p udp --dportport  -j ACCEPT in there before you go to REJECT=
=2E

--=20
Best Regards,

for testing purpose i have flushed all rules in iptables -t filter

$iptables -t filter --flush

but still if try putting data by nc:

$nc -uvv localhost 7160

outputs :

write error: connection refused.



Is SELinux installed and Enforcing?

--
Best Regards,

Giles Coochey
NetSecSpec Ltd
UK Mobile: +44 7983 877 438
Business Email: giles.cooc...@netsecspec.co.uk
Email/MSN/Live Messenger: gi...@coochey.net
Skype: gilescoochey


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos