LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 08-31-2004, 09:08 PM   #1
cobolexpert
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 2
Posts: 5

Rep: Reputation: 0
Open Port Range


Could someone give me the correct verbage for allowing a range of ports (on UDP and TCP) through the firewall on Fedora 2? I need to let 27000 - 27040 through and I am having a hard time understanding what I need to type in.

Thank you,
JB
 
Old 09-01-2004, 02:04 AM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 57
As root:

iptables -I INPUT -p tcp --dport 27000:27040 -j ACCEPT
iptables -I INPUT -p udp --dport 27000:27040 -j ACCEPT
 
Old 09-01-2004, 07:37 AM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
Question though; does it matter what # rule these are? If the packets are already dropped, would the latter "Accept" rule matter? (I'm very new to iptables and am trying to learn)
 
Old 09-01-2004, 08:26 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 57
With the -I (Insert) option, the rules are automatically placed first in the ruleset. With -A (Append), they're added last and you can indeed have order number problems. However, using -I gets around that without getting overly complex.
 
Old 09-02-2004, 02:46 AM   #5
cobolexpert
LQ Newbie
 
Registered: Aug 2004
Distribution: Fedora Core 2
Posts: 5

Original Poster
Rep: Reputation: 0
Noob Question

So I restarted my box and started freaking because I couldnt get to it over the ports. Obviously, after thinking, I realized I probably never saved the configuration... whats the command to save the settings? I dont see anything in --help for iptables.

Thanks
 
Old 09-02-2004, 09:30 AM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 57
service iptables save

or

/sbin/iptables-save > /etc/sysconfig/iptables
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open ports for an ip range xuying Linux - Networking 0 11-17-2004 02:06 AM
udp port forwarding to ip range oddo Linux - Networking 0 10-04-2004 08:09 AM
snmp(walk) port range gummimann Linux - Networking 3 01-16-2004 08:01 AM
snmp(walk) port range gummimann Linux - Security 1 01-15-2004 12:46 PM
Port Range Forwarding htimst Linux - Networking 1 07-14-2002 01:31 AM


All times are GMT -5. The time now is 10:31 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration