LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-23-2005, 10:44 AM   #1
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Rep: Reputation: 15
Opening Port


Hello Peeps.
I am having a bit of trouble opening a port in Fedora Core, I run a command
nmap -P0 192.168.1.12
and returns a list of open ports... thats fine, i can see what ports are open. I tried using the command for iptables to open port 25 i did the iptables-save command and restarted iptables but it hasnt seem to have worked. I typed the command from a book which i dont have to hand at the moment... could anyone tell me a simple command to open a port number, and leave it opened, even after the pc or service has restarted (ie save that configuration for that port being opened)

while we are on the subject of opening ports.... anyone know how to do the reverse and close them?

Cheers for your help, its the one thing that i think is stopping my mail server from working (hopefully the only thing)

Steve
 
Old 07-23-2005, 11:15 AM   #2
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
I think the firewall is being started by fedora's Main Menu > System Settings > Security Level ,You may want to use a program like firestarter.
 
Old 07-23-2005, 11:33 AM   #3
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
iptables-save is a command you should be using with iptables-restore. so you do
iptables-save > firewall.rules
at satrup you can have a script run
iptables-restore < firewall.rules
or something like that - have a look at the man pages.
by 'opening' port 25 on your firewall, does not mean that the port is really open! you need a service that is running on port 25, ie. postfix or exim
if you want to take care of the firewall rules yourself, rather than using the FC gui, i recomend you disable the FC firewall, and use the iptables command by hand, ie. writing a simple bash script, which you run at startup

google for iptables tutorial, one of the first 2 or 3 entries is a really good manual
 
Old 07-23-2005, 12:20 PM   #4
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
the thing is, i have got postfix running, and my firewall is disabled. if i run the same nmap command on my routers ip address it says 25 closed and 53 is open (because i have my router mapped to the client pc for ports 25 and 53), so 53 seems to be open and im runing bind on that and 25 seems to be closesd yet i am running postfix on it. any further suggestions?

Steve
 
Old 07-23-2005, 12:46 PM   #5
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
anything you do from the lan side of your router addresses the router itself, not the pc you have set for certain ports to be forwarded to! port 53 is open on your router since it runs a dns relay.

make sure you have set the default policies correctly on iptables (includeing on nat and magle tables)
 
Old 07-23-2005, 02:05 PM   #6
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
nothng to do with router, nothing to do with iptables, i found it and its now open. i had to modify the main.cf file for postfix for the inet_interfaces parameter.
 
  


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
opening port 433 thekidder Linux - Newbie 11 09-09-2005 08:13 PM
opening a port Robin01 Linux - General 3 11-17-2004 11:40 PM
Opening a Port gpamkenny Linux - Networking 3 11-04-2004 03:51 PM
Opening port 80 nmoog Linux - Newbie 4 02-01-2004 05:00 PM
Question on opening up a port cagspy Linux - Security 3 07-03-2002 08:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 PM.

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