Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
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
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?
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
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)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.