LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2010, 08:58 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
how to open port at iptable?


How to open port at iptable?

My box is centos 5.4.

I wanto to open UDP 177 and TCP 6000~60010.

I can connect my box through putty now.

Helpful comment would be appreciated.
 
Old 10-11-2010, 09:25 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,367
Blog Entries: 12

Rep: Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752
http://www.iptables.org/ or http://security.maruhn.com/iptables-tutorial/ should help.

I like to use Firestarter or an rc.firewall script for a frontend to iptables, mostly because I'm used to them.

In rc.firewall, you use a PERMIT statement. For example:

PERMIT="192.168.1.0/8:137-139/tcp"

Syntax:

PERMIT="[network or computer ip address]/[netmask]:[port/port range]/[protocol]"

This is part of the PERMIT that open my file server to tcp from other computers in my local network.

The rc.firewall script is usually heavily annotated, but the Firestarter GUI is friendlier, lots friendlier.

Last edited by frankbell; 10-11-2010 at 09:26 PM. Reason: Add rc.firewall link
 
Old 10-11-2010, 09:31 PM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
frankbell/

Thanks a lot!

I'm insterested in Firestarter GUI, I'll study it.
 
Old 10-11-2010, 09:59 PM   #4
sandebains
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Hi, I assume you are looking for inbound traffic, you can use the below commands

iptables -A INPUT -i <interface> -p udp --dport 177 -j ACCEPT

iptables -A INPUT -i <interface> -p udp -m multiport --dports 6000:60010 -j ACCEPT

instead of using -i <interface>, you can also use the -s <IP Address>

Sandeep
 
Old 10-13-2010, 10:44 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mint, OpenBSD
Posts: 11,367
Blog Entries: 12

Rep: Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752Reputation: 2752
Quote:
Originally Posted by windstory View Post
I'm insterested in Firestarter GUI, I'll study it.
Firestarter is one of the friendliest firewall frontends I have used under either Windows or Linux, assuming that one understands the concept of a port. It does require Gnome libraries.
 
  


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
iptable rule to open samba port vinaytp Linux - Newbie 3 06-16-2010 02:33 AM
iptable for dansguardian port redirect vijay1585 Linux - Software 1 04-30-2009 08:05 PM
port forwarding using IPTABLE ...( Help) ad2005 Linux - Networking 5 03-15-2006 11:56 PM
IPTable Problems (Port Forwarding)... Arch3Angel Linux - Security 3 12-04-2004 05:56 PM
Iptable-rules block port 80 goldenmag Linux - Security 3 09-05-2003 07:56 PM


All times are GMT -5. The time now is 08:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration