LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-22-2005, 04:35 PM   #16
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60

How do have your network setup? Do you have it setup on its own DMZ. Do you use Lingo or what VOIP service do you use? I am so glad that I finally ran into somebody with this same headache. Please read my other posting

http://www.linuxquestions.org/questi...hreadid=382722

and try using this patchomatic fix for netfilter

http://people.netfilter.org/chentsch...track-nat.html

http://www.netfilter.org/patch-o-mat...-conntrack-nat

You need kernel 2.6+ for this patch to work and then apply this rules ex.

Using sip-conntrack-nat

Once you've recompiled the kernel, make sure you load the modules.

Wookie:/home/chentschel#modprobe ip_conntrack_sip ip_nat_sip Wookie:/home/chentschel# lsmod | grep ip_nat_sip ip_nat_sip 4288 0 ip_conntrack_sip 6544 1 ip_nat_sip iptable_nat 20444 1 ip_nat_sip ip_conntrack 38808 3 ip_nat_sip,ip_conntrack_sip,iptable_nat Wookie:/home/chentschel#

Netfilter will take care of the conntracking and NAT of SIP packets now, but don't forget the iptables rules. Examples as follows:

Set iptables rules to allow UDP packets on port 5060:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p udp --dport 5060 -j ACCEPT

And NAT as follows:
iptables -A FORWARD -o eth0 -p udp --dport 5060 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.68.89.15

I hope this helps! Please let me know if you get this working because then I need some help
enyawix
 
Old 11-23-2005, 01:09 PM   #17
enyawix
Member
 
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 409

Rep: Reputation: 32
Post My Setup

My setup is a two NIC Ipcop firewall with small mods by hand. Changes by hand = blocked class A, B, & C private, D mulicast, and E reserved addresses. Also added a small black list "known spy-ware companies".

Last edited by enyawix; 11-23-2005 at 01:11 PM.
 
Old 11-23-2005, 03:39 PM   #18
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
when you figure it out please let me know how you got it to work! I am in the process of upgrading my kernel to 2.6+ and applying these patchomatics. keep me updated. This is driving me crazy!
 
Old 12-04-2005, 03:29 PM   #19
enyawix
Member
 
Registered: Sep 2003
Location: ky
Distribution: gentoo
Posts: 409

Rep: Reputation: 32
issue fixed :)

I was not thinking iptables filters based on first match. Explicit DROP and ACCEPT must accrue before general rules or the packet will be match to a general rule.

iptables -I INPUT -s 66.147.224.0/20 -j ACCEPT

iptables -I FORWARD -s 66.147.224.0/20 -j ACCEPT

Your nat chain has same issue.

Use

iptables -I FORWARD -o eth0 -p udp --dport 5060 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.68.89.15

Not

iptables -A FORWARD -o eth0 -p udp --dport 5060 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 200.68.89.15
 
Old 12-05-2005, 08:50 PM   #20
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
I will try this. I get back to you thanks.
 
Old 12-07-2005, 12:49 PM   #21
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 2,190

Original Poster
Rep: Reputation: 60
Can you post your VOIP rules

INPUT

POSTROUTING

PREROUTING

FORWARD

Chains so that I can compare! thanks

Last edited by metallica1973; 12-07-2005 at 04:12 PM.
 
  


Reply



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
Voip tarak4u Linux - Networking 1 12-06-2005 12:26 PM
VoIP monohouse Linux - Software 1 01-21-2005 03:54 PM
VoIP pagadala_cs Linux - Networking 1 09-08-2004 08:29 PM
VoIP Program InVisionNick Linux - Software 1 06-22-2004 04:41 AM
voip karunesh Linux - General 1 09-16-2003 04:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:41 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration