LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-29-2008, 04:03 PM   #1
Khawk
LQ Newbie
 
Registered: Feb 2005
Posts: 21

Rep: Reputation: 15
Testing SIP port behind NAT/Firewall


Hi

I need to test SIP port reachability on public hosted server (CentOS 5.2) on GoDaddy. It is running behind PIX firewall and NAT.
i.e.

<server-ip=10.0.0.1>
|
|
|
[ <PIX: LAN Interface: 10.0.0.X>
<Public Interface: XXX.XXX.XXX.XXX> ]
|
|
|
INTERNET

Whats the best way to test udp port 5060. I tried using nc (netcat) but I think it does work behind NAT, something like

On the Public server
-----------------------------
[root@server ~]#nc -u -l 5060

On another terminal, on the same server
[root@server ~]#netstat -anp|grep "5060"
udp 0 0 0.0.0.0:5060 0.0.0.0:* 24830/nc

On My remote machine
---------------------
XXX.XXX.XXX.XXX -> Public IP of the server
[root@hawk-laptop-ibm ~]# nc -u XXX.XXX.XXX.XXX 5060
asd
asdad
asddasdasdasd
nc: Write error: No route to host
asd
nc: Write error: No route to host


---------------
Is there any way to make 100 % sure about UDP/TCP port reachability behind NAT/Firewall.

Ciao
Khawk
 
Old 08-31-2008, 12:56 AM   #2
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
Its quite clear that netcat couldnt connect to the udp port you specified. Moreover, it couldnt even find a route to connect to the public ip you provided.
Can you even ping the IP?
Have you configured your firewall to allow port 5060 to pass through to the internal ip?

One more thing my netcat would use a -p to define a port to listen to
nc -u -l -p 5060
 
Old 08-31-2008, 05:19 AM   #3
Khawk
LQ Newbie
 
Registered: Feb 2005
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Moreover, it couldnt even find a route to connect to the public ip you provided.
I am not sure why this route error comes up probably because nc listening on private ip and remote machine is sending on public ip, I am not sure.

Quote:
Can you even ping the IP?
pings are blocked by the firewall.
Quote:
Have you configured your firewall to allow port 5060 to pass through to the internal ip?
The firewall (PIX) is configured to pass through UDP 5060 port to internal server.

Quote:
One more thing my netcat would use a -p to define a port to listen to nc -u -l -p 5060
That behavior was used in the previous versions of nc, probably, I am using 1.84 and the option -p, as in man pages, is source port (Specifies the source port nc should use, subject to privilege restrictions and availability. It is an error to use this option in conjunction with the -l option)
 
Old 09-01-2008, 12:44 AM   #4
w3bd3vil
Senior Member
 
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,189

Rep: Reputation: 49
Why dont you try setting up a snmp (any) server behind the firewall and see if that connects?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot get SIP Phone to work over iptables firewall browny_amiga Linux - Networking 2 02-11-2008 06:54 PM
Testing port 6881....NAT Error - error in Azureus dr_zayus69 Linux - Security 20 05-26-2006 01:52 PM
why port scans from BEHIND nat/firewall are inaccurate? djc Linux - Security 5 11-16-2005 10:56 AM
SSH port forwarding thru a NAT Firewall whoever Linux - Networking 3 07-29-2005 03:24 AM


All times are GMT -5. The time now is 09:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration