LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 04-24-2007, 10:39 AM   #1
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 1,966

Rep: Reputation: 55
IPTABLES and Forwarding


When you add a forwarding rule to a script like:

PHP Code:
$IPTABLES -A FORWARD -p udp -i $EXTIF -o $DMZ_IFACE -d $DMZ_VOIP_SERVER --dport 5050:5065 -m state --state NEW -j ACCEPT 
I should be able to see the port open when I perform an external port scan correct? Everytime I attempt to run an external port scan from the web it always says that it is filtered, so does that mean that it is open and that it will only allow requests from udp 5050:5065?

I am trying to setup a Asterisk VOIP Server and I cannot recieve any incomming calls. so help?
 
Old 04-24-2007, 01:51 PM   #2
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Rep: Reputation: 30
Quote:
Originally Posted by metallica1973
When you add a forwarding rule to a script like:

PHP Code:
$IPTABLES -A FORWARD -p udp -i $EXTIF -o $DMZ_IFACE -d $DMZ_VOIP_SERVER --dport 5050:5065 -m state --state NEW -j ACCEPT 
I should be able to see the port open when I perform an external port scan correct? Everytime I attempt to run an external port scan from the web it always says that it is filtered, so does that mean that it is open and that it will only allow requests from udp 5050:5065?

I am trying to setup a Asterisk VOIP Server and I cannot recieve any incomming calls. so help?

If a port appears to be in the state called filtered, it means that the port is in use, but not open to anyone. Try turning your firewall off, and then try do a portscan again from your external computer. If it appears that it is the firewall, then try to simplify your firewall rules so that you may easier see threw it. That line you posted has variables which are not shown here. you need to post more if you want to receive better help. However; exposing firewall rules on the world wide web is a bad thing to do if this should appear in the hands of a hacker, so only post what you have ATM, and only the parts which you think is relevant for us to help you.
 
Old 04-24-2007, 03:04 PM   #3
win32sux
Moderator
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
Originally Posted by metallica1973
When you add a forwarding rule to a script like:

PHP Code:
$IPTABLES -A FORWARD -p udp -i $EXTIF -o $DMZ_IFACE -d $DMZ_VOIP_SERVER --dport 5050:5065 -m state --state NEW -j ACCEPT 
I should be able to see the port open when I perform an external port scan correct?
it depends on whether you actually have something listening on the port or not... the port shouldn't be reported as "open" unless something is listening on it...

Quote:
Everytime I attempt to run an external port scan from the web it always says that it is filtered, so does that mean that it is open and that it will only allow requests from udp 5050:5065?
it means that the packets the scanner is sending aren't generating any response... this could be an issue with your iptables rules (check your PRE/POSTROUTING chains in the NAT table)... the rule you posted won't care what port requests are coming from, as long as they go *to* ports 5050:5065...

Quote:
I am trying to setup a Asterisk VOIP Server and I cannot recieve any incomming calls. so help?
Moved: This thread is more suitable in Linux - Networking and has been moved accordingly to help your thread/question get the exposure it deserves.

Last edited by win32sux; 04-24-2007 at 03:07 PM.
 
Old 04-24-2007, 05:22 PM   #4
metallica1973
Senior Member
 
Registered: Feb 2003
Location: Washington D.C
Posts: 1,966

Original Poster
Rep: Reputation: 55
Things are fine and that the state of filtered means it is open to certain packets to pass through the firewall. I had a unique setup at my office and realized that my firewall rule set is ok. After I made some hardware changes around in my network , my voip server was able to recieve calls. It appears that a VOIP ATA that was setup in front of a firewall was causing false/positives. Many thanks
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Forwarding using IPTables depam Linux - Networking 1 01-19-2006 04:30 PM
iptables forwarding... AnalyticaL Linux - Networking 5 09-28-2004 08:55 AM
Iptables Forwarding Help!! jglazner Linux - Networking 2 10-20-2003 05:04 PM
IP forwarding through iptables harshalupatel Linux - Networking 0 06-18-2003 01:29 PM


All times are GMT -5. The time now is 02:35 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
Open Source Consulting | Domain Registration