Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-12-2006, 10:37 PM
|
#1
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Rep:
|
Iptables & Asterisk
Hi
I have an Asterisk server inside a firewall (Redhat iptables).
Can some body tell me how to do the iptable entry’s o some one from outside can call in to my sasterisk and make a call and to call out to the internet.
Asterisk uses 5060 udp for signaling
10000 to 20000 for RTP voice channels
Thank you
Regards,
Asanka
|
|
|
03-13-2006, 06:21 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
Please have a look at http://www.voip-info.org/wiki-Asterisk+firewall+rules . Read, try, watch for errors, adjust rules. *Then* ask. And if you want to get rules, please post what you tried yourself plus any errors.
|
|
|
03-15-2006, 03:08 AM
|
#3
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Original Poster
Rep:
|
HAi unSpawn
here is what I am using at the moment. I am not a pro on this so I just match what our mail server uses.
-A PREROUTING -d 203.143.24.252 -i eth0 -p udp -m udp --dport 5060 -j DNAT --to-destination 192.168.20.20:5060
-A PREROUTING -d 203.143.24.123 -i eth0 -p tcp -m tcp --dport 5060 -j DNAT --to-destination 192.168.20.20:5060
-A POSTROUTING -s 192.168.20.20 -j SNAT --to-source 203.143.24.252
-A FORWARD -d 192.168.20.20 -i eth0 -p udp -m udp --dport 5060 -j ACCEPT
-A FORWARD -d 192.168.20.20 -i eth0 -p tcp -m tcp --dport 5060 -j ACCEPT
With these entries outsider users can register, and I am using SJphone as my client
Apriciate your help
I am using sip.conf and extensions.conf
[general]
externip = 203.143.24.123
localnet = 192.168.11.0/255.255.255.0
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
[3001]
type=friend
username=3001
;secret=3001
host=dynamic
context=internal
canreinvite=no
nat=yes
[internal]
exten=>3001,1,Dial(SIP/3001)
Kind regards
Asanka
|
|
|
03-15-2006, 03:09 AM
|
#4
|
Member
Registered: Jan 2006
Location: Sri Lanka
Posts: 651
Original Poster
Rep:
|
HAi unSpawn
here is what I am using at the moment. I am not a pro on this so I just match what our mail server uses.
-A PREROUTING -d 203.143.24.252 -i eth0 -p udp -m udp --dport 5060 -j DNAT --to-destination 192.168.20.20:5060
-A PREROUTING -d 203.143.24.123 -i eth0 -p tcp -m tcp --dport 5060 -j DNAT --to-destination 192.168.20.20:5060
-A POSTROUTING -s 192.168.20.20 -j SNAT --to-source 203.143.24.252
-A FORWARD -d 192.168.20.20 -i eth0 -p udp -m udp --dport 5060 -j ACCEPT
-A FORWARD -d 192.168.20.20 -i eth0 -p tcp -m tcp --dport 5060 -j ACCEPT
With these entries outsider users can register, and I am using SJphone as my client
Apriciate your help
I am using sip.conf and extensions.conf
[general]
externip = 203.143.24.123
localnet = 192.168.11.0/255.255.255.0
context=default
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
[3001]
type=friend
username=3001
;secret=3001
host=dynamic
context=internal
canreinvite=no
nat=yes
[internal]
exten=>3001,1,Dial(SIP/3001)
Kind regards
Asanka
|
|
|
All times are GMT -5. The time now is 07:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|