Networking Forums

Networking Forums > Computer Networking > Linux Networking > netfilter & SIP

Reply
Thread Tools Display Modes

netfilter & SIP

 
 
Miss Terre
Guest
Posts: n/a

 
      09-28-2007, 12:56 PM
Hello all,

is there a patch for netfilter regarding the SIP protocol (for telephony
in VOIP).
It seems there is, but, I can not find it.
Any suggestions ?
 
Reply With Quote
 
 
 
 
Mark T.B. Carroll
Guest
Posts: n/a

 
      09-28-2007, 01:21 PM
Miss Terre <(E-Mail Removed)> writes:

> is there a patch for netfilter regarding the SIP protocol (for telephony
> in VOIP).
> It seems there is, but, I can not find it.
> Any suggestions ?


What do you want the patch to do? What feature are you missing?

(You know about things like CONFIG_IP_NF_SIP? If it's a NAT issue,
recent kernels have SIP-aware stuff, though I think the earlier attempts
were a bit flaky.)

Mark
 
Reply With Quote
 
Miss Terre
Guest
Posts: n/a

 
      09-28-2007, 01:29 PM
In article <(E-Mail Removed)>, (E-Mail Removed) says...
> Miss Terre <(E-Mail Removed)> writes:
>
> > is there a patch for netfilter regarding the SIP protocol (for telephony
> > in VOIP).
> > It seems there is, but, I can not find it.
> > Any suggestions ?

>
> What do you want the patch to do? What feature are you missing?
>
> (You know about things like CONFIG_IP_NF_SIP? If it's a NAT issue,
> recent kernels have SIP-aware stuff, though I think the earlier attempts
> were a bit flaky.)
>
> Mark
>


Great !
This effectively concerns the NAT issue. How make a PC behind a linux
firewall with MASQUERADING working with X-lite ?
I'll dig this !
thanks a lot.
 
Reply With Quote
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      09-28-2007, 01:46 PM
On 09/28/2007 06:59 PM, Miss Terre wrote:
> In article <(E-Mail Removed)>, (E-Mail Removed) says...
>> Miss Terre <(E-Mail Removed)> writes:
>>
>>> is there a patch for netfilter regarding the SIP protocol (for telephony
>>> in VOIP).
>>> It seems there is, but, I can not find it.
>>> Any suggestions ?

>> What do you want the patch to do? What feature are you missing?
>>
>> (You know about things like CONFIG_IP_NF_SIP? If it's a NAT issue,
>> recent kernels have SIP-aware stuff, though I think the earlier attempts
>> were a bit flaky.)
>>
>> Mark
>>

>
> Great !
> This effectively concerns the NAT issue. How make a PC behind a linux
> firewall with MASQUERADING working with X-lite ?
> I'll dig this !
> thanks a lot.


The X-lite and many other good SIP clients/servers can also use STUN for
traversing UDP datagrams/packets over NAT.

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
 
Reply With Quote
 
Miss Terre
Guest
Posts: n/a

 
      09-28-2007, 02:02 PM
In article <(E-Mail Removed)>,
(E-Mail Removed) says...
> On 09/28/2007 06:59 PM, Miss Terre wrote:
> > In article <(E-Mail Removed)>, (E-Mail Removed) says...
> >> Miss Terre <(E-Mail Removed)> writes:
> >>
> >>> is there a patch for netfilter regarding the SIP protocol (for telephony
> >>> in VOIP).
> >>> It seems there is, but, I can not find it.
> >>> Any suggestions ?
> >> What do you want the patch to do? What feature are you missing?
> >>
> >> (You know about things like CONFIG_IP_NF_SIP? If it's a NAT issue,
> >> recent kernels have SIP-aware stuff, though I think the earlier attempts
> >> were a bit flaky.)
> >>
> >> Mark
> >>

> >
> > Great !
> > This effectively concerns the NAT issue. How make a PC behind a linux
> > firewall with MASQUERADING working with X-lite ?
> > I'll dig this !
> > thanks a lot.

>
> The X-lite and many other good SIP clients/servers can also use STUN for
> traversing UDP datagrams/packets over NAT.


My goal is to make X-lite (under windows, on a PC behind the firewall)
be able to work through the linux firewall, with no modification (as
possible) on the windows client.
Would STUN help for this ?
I must admit I didn't know STUN.
Regards
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      09-28-2007, 02:50 PM
Hello,

Miss Terre a écrit :
>
> is there a patch for netfilter regarding the SIP protocol (for telephony
> in VOIP).


Support for connection tracking and NAT of the SIP protocol in Netfilter
is included in the mainline kernel since version 2.6.18. Of course it
has to be enabled at configure/build time. Snapshots of the
patch-o-matic-ng until patch-o-matic-ng-20061211 contain experimental
patches for older kernels versions >= 2.6.11.

As usual, load the ip_conntrack_sip and ip_nat_sip modules (or
nf_conntrack_sip and nf_nat_sip in recent kernels), then create iptables
rules which accept NEW outgoing SIP packets (to UDP port 5060) and
ESTABLISHED,RELATED packets from/to any port in both directions.

However, as others said, some SIP clients such as X-Lite can use NAT
traversal techniques such as STUN which do not require specific support
for the SIP protocol in the firewall/NAT.
 
Reply With Quote
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      09-28-2007, 02:54 PM
On 09/28/2007 07:32 PM, Miss Terre wrote:
> In article <(E-Mail Removed)>,
> (E-Mail Removed) says...
>> On 09/28/2007 06:59 PM, Miss Terre wrote:
>>> In article <(E-Mail Removed)>, (E-Mail Removed) says...
>>>> Miss Terre <(E-Mail Removed)> writes:
>>>>
>>>>> is there a patch for netfilter regarding the SIP protocol (for telephony
>>>>> in VOIP).
>>>>> It seems there is, but, I can not find it.
>>>>> Any suggestions ?
>>>> What do you want the patch to do? What feature are you missing?
>>>>
>>>> (You know about things like CONFIG_IP_NF_SIP? If it's a NAT issue,
>>>> recent kernels have SIP-aware stuff, though I think the earlier attempts
>>>> were a bit flaky.)
>>>>
>>>> Mark
>>>>
>>> Great !
>>> This effectively concerns the NAT issue. How make a PC behind a linux
>>> firewall with MASQUERADING working with X-lite ?
>>> I'll dig this !
>>> thanks a lot.

>> The X-lite and many other good SIP clients/servers can also use STUN for
>> traversing UDP datagrams/packets over NAT.

>
> My goal is to make X-lite (under windows, on a PC behind the firewall)
> be able to work through the linux firewall, with no modification (as
> possible) on the windows client.


You need not modify anything on any machine, think that you don't even
have control over these; just configure your X-Lite to use some
publically available stun server.

> Would STUN help for this ?


Yes.

> I must admit I didn't know STUN.


Tsk, tsk! try Wikipedia http://en.wikipedia.org/wiki/STUN

<blah>
In case STUN does not serve your purpose well and, or you still are
interested to go by netfilter route, the http://www.iptel.org/sipalg/
page could be quite handy.

I have:
[bsd@cto ~]$ grep SIP=. /usr/src/linux-2.6.22.8/.config
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_NAT_SIP=m
</blah>

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
 
Reply With Quote
 
Mark T.B. Carroll
Guest
Posts: n/a

 
      09-28-2007, 03:57 PM
Balwinder S Dheeman <(E-Mail Removed)> writes:
(snip)
> I have:
> [bsd@cto ~]$ grep SIP=. /usr/src/linux-2.6.22.8/.config
> CONFIG_NF_CONNTRACK_SIP=m
> CONFIG_NF_NAT_SIP=m
> </blah>


Mmmm. My problem is my ISP gives me an RFC1918 address on my external
interface but they route a static routable IP address to it, in a sort
of NAT-on-their-end. So, if I try using the netfilter stuff above,
it puts the wrong IP address as the place to find me.

Mark
 
Reply With Quote
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      09-28-2007, 08:11 PM
On 09/28/2007 09:27 PM, Mark T.B. Carroll wrote:
> Balwinder S Dheeman <(E-Mail Removed)> writes:
> (snip)
>> I have:
>> [bsd@cto ~]$ grep SIP=. /usr/src/linux-2.6.22.8/.config
>> CONFIG_NF_CONNTRACK_SIP=m
>> CONFIG_NF_NAT_SIP=m
>> </blah>

>
> Mmmm. My problem is my ISP gives me an RFC1918 address on my external
> interface but they route a static routable IP address to it, in a sort
> of NAT-on-their-end. So, if I try using the netfilter stuff above,
> it puts the wrong IP address as the place to find me.


That's why people prefer STUN, which is much more mature compared to
netfilter. In some of the cases, where your SIP client and, or server
does not have STUN functionality, we may still use some independent STUN
client to discover our external IP and reconfigure the iptables accordingly.

--
Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
Anu'z Linux@HOME Machines: #168573, 170593, 259192
Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      09-28-2007, 09:54 PM
Balwinder S Dheeman a écrit :
>
> That's why people prefer STUN, which is much more mature compared to
> netfilter.


What do you mean by "more mature" ? IMHO one cannot compare Netfilter
and STUN, they are too different in their nature and purpose.

> In some of the cases, where your SIP client and, or server
> does not have STUN functionality, we may still use some independent STUN
> client to discover our external IP and reconfigure the iptables accordingly.


What do you reconfigure in iptables exactly ?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Netfilter Prafulla T Linux Networking 0 12-30-2006 03:42 AM
Netfilter question g68 Linux Networking 2 10-15-2006 01:31 PM
netfilter libiptc jasonsig Linux Networking 0 05-05-2006 12:07 PM
Netfilter - is there something faster ? Marcin Szczepaniak Linux Networking 2 03-23-2005 04:13 AM
Netfilter questoin Noah Roberts Linux Networking 4 01-21-2005 05:37 PM



1 2 3 4 5 6 7 8 9 10 11