ICMP - destination unreachabe (port unreachable)

Hi there - I’m having trouble connecting to FreePBX running inside VMware on XP - i am new to this so i’m rapidly getting lost :slight_smile:
FreePBX is not in a DMZ of any kind.

I have a linksys router which has issued an IP address of 192.168.1.104 to centos linux
I can ping centos from XP machine whose has IP of 192.168.1.100

I am trying to connect a SIP client on my mobile phone to my home linksys gateway which has been assigned IP of 83.345.235.123

I can see the SIP request come in and get picked up by my router @ 192.168.1.1 and attempted to be forwarded to freepbx

26 4.220435 192.168.1.1 192.168.1.104 SIP Request: REGISTER sip:83.345.235.123:5062

as I have set up a port forward rule on the router to forward this request to the centos freepbx server @ 192.168.1.104

the request does not get through to the freepbx server as (i think) the linux firewall has not opened up the appropriate port 5060 or 5062 - can’t work this out from src port and dst below - i have my freepbx server listening on port 5062 and phone is sending on 5063 as well… where is port 5060 coming from??!

27 4.220685 192.168.1.104 192.168.1.1 ICMP Destination unreachable (Port unreachable)
User Datagram Protocol, Src Port: sip (5060), Dst Port: 5062 (5062)
REGISTER sip:83.345.235.123:5062 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.101;rport;branch=z9hG4bK6UNDp764agNUH
Max-Forwards: 70
From: sip:[email protected];tag=6e8pD5ctrD4Qr
To: sip:[email protected]
Call-ID: 55d9a2b2-2e92-122c-32ab-4d2b4fac67e8
CSeq: 107305518 REGISTER
Contact: sip:192.168.1.101
User-Agent: iPhone Truphone
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE
Supported: timer, 100rel, path
Content-Length: 0

also, i’m not sure whether this is important -> Via: SIP/2.0/UDP 192.168.1.101;rport;branch=z9hG4bK6UNDp764agNUH

would expect it (SIP request) to go VIA 92.168.1.104?

I have tried to change my iptables on the centos side, but still can’t see any ports open which would provide a route for this SIP request to get to freepbx server.
since freepbx server is running, would you expect to see the 5062 sip port open when i run nmap -sT -O locahost?

i’m finding difficult to understand whether it is a firewall issue as even if i addd a rule to open port 5062 in iptables and restart, i still do not see the SIP request traffic getting through…

help! if anyone has 10 mins to help us out on this i would be enteranlly grateful. it would be fantastic if i could get my phone working with the freepbx system.

oh, one other thing i’ll mention is if i connect with a softphone from my 192.168.1.100 xp IP (using the SIP server as 83.345.235.123) evertyhing works fine and i can connect to my external voip provider and have amazing quality calls.

when i took the wireshark trace for this scenario, i noticed the the incoming sip request does not reference the 5062 port - in this case, the SIP request is correectly routed through to freepbx and the handshaking is completed and call is established.

14 4.591821 192.168.1.100 83.345.235.123 SIP Request: REGISTER sip:83.345.235.123 <- note no port seen here, thoguh specified on softphone as 5062

results in handshaking continuing (i can see freepbx responds to the softphone as opposed to replying with ICMP error) 18 4.600950 192.168.1.104 192.168.1.1 SIP Status: 100 Trying (1 bindings)

Any ideas anyone. Sorry to bore :frowning:

Cheers, Jon

it makes it very confusing when different people start responding separately.