Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory modem monitor motherboard mouse network printer problem ram registry repair router slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Need a Crash Course in iptables (redhat)

Reply  
Thread Tools
Omega_Shadow's Avatar
Senior Member with 4,324 posts.
 
Join Date: Aug 2004
Location: Somewhere south of Hell
Experience: Bringing Linux to the Masses
05-Dec-2006, 11:44 PM #1
Need a Crash Course in iptables (redhat)
I need to open a port in our firewall so it will accept an incoming port for a program my boss wishes to use. The Firewall box is running redhat (no gui of course) and I think the actual firewall is iptables, though it might be something else (the last IT guy failed to leave any documentation on it) iptable looks to be configured but I also found something called aconda installed too.

This is my first time dealing with a firewall using iptables (or console only for that mater).

I need a quick and dirty crash course on iptable or aconda if that is a firewall also. Squashman, if you got any more of those handy-save-my-arse links now would be the time
__________________
I'm not here. I am just more likely to be here then not be here. It's physics, I don't expect you to understand.
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
06-Dec-2006, 05:38 PM #2
OS,

Try this link for tutorial on iptables: http://iptables-tutorial.frozentux.n...-tutorial.html

Here's a complementary Easy Firewall Generator for IPTables to that tutorial at:
http://easyfwgen.morizot.net/gen/

Here's another Iptable Firewall guide to provide a basic knowledge about iptables and then help to create a firewall script. (Ubuntu oriented, but quite good) at:
http://doc.gwos.org/index.php/IptablesFirewall

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein

Last edited by lotuseclat79; 06-Dec-2006 at 05:47 PM..
Omega_Shadow's Avatar
Senior Member with 4,324 posts.
 
Join Date: Aug 2004
Location: Somewhere south of Hell
Experience: Bringing Linux to the Masses
06-Dec-2006, 05:48 PM #3
That would take a week an a half to read and understand! Still going to read it so I can understand it after all this is done but I got to have this working by this weekend for him!

Anyone know, in english, how to open port XXXX to IP xxx.xxx.x.x in iptables?
__________________
I'm not here. I am just more likely to be here then not be here. It's physics, I don't expect you to understand.
fenderfreek's Avatar
Computer Specs
Senior Member with 201 posts.
 
Join Date: Mar 2006
Location: Raleigh, NC
Experience: Advanced
06-Dec-2006, 08:44 PM #4
I found one that's fairly newbie-friendly here - see if this is more to your liking.

http://www.cse.msu.edu/~minutsil/iptables.html
Omega_Shadow's Avatar
Senior Member with 4,324 posts.
 
Join Date: Aug 2004
Location: Somewhere south of Hell
Experience: Bringing Linux to the Masses
06-Dec-2006, 10:20 PM #5
Yeah, thats more my speed Thanx
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
07-Dec-2006, 11:33 AM #6
If you haven't figured out how to open up a port yet, here's how:

Assuming you have created a TRUSTED chain: Note: if something doen't work open the port corresponding to the service you want to open (look in /etc/service to know the port number).

To open a new port just add a new rule for the TRUSTED chain like this for tcp :
Code:

iptables -A TRUSTED -i eth0 -p tcp -m tcp --sport port_number -j ACCEPT

or for udp :
Code:

iptables -A TRUSTED -i eth0 -p udp -m udp --sport port_number -j ACCEPT

Quick and dirty implementation is to substitute INPUT for TRUSTED in above examples, but I do not know how secure that would be.

Reference: HOWTO: Set a custom firewall (iptables) and Tips at:
http://www.ubuntuforums.org/showthread.php?t=159661

Ignore that the info is on an Ubuntu forum, it should work on any Linux iptables setup. Note: read the webpage first if you don't understand anything, and then use the reference links provided at the bottom of the webpage:
http://yolinux.com/TUTORIALS/LinuxTu...rkGateway.html

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
Omega_Shadow's Avatar
Senior Member with 4,324 posts.
 
Join Date: Aug 2004
Location: Somewhere south of Hell
Experience: Bringing Linux to the Masses
07-Dec-2006, 02:58 PM #7
Yep, I got it set up already, but I will be reading all these links so I can make a more secure firewall. And hopefully in the future I can figure out how to allow for some sort of VNC between here and home so I can make last minute changes without having to walk all the way back here.

Thanx for all the info guys
__________________
I'm not here. I am just more likely to be here then not be here. It's physics, I don't expect you to understand.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:51 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.