LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Allowing certain ports and port forwarding without messing up current config (https://www.linuxquestions.org/questions/linux-newbie-8/allowing-certain-ports-and-port-forwarding-without-messing-up-current-config-698325/)

media-c 01-19-2009 07:31 AM

Allowing certain ports and port forwarding without messing up current config
 
Hi

I've been thrown into the deep end in my company and am eager to learn Linux Administration and the ins and outs around hosting websites on my Linux box.

The first question I have is: How do I open ports 2082 and 2095 without messing up any of the current settings and how secure are these ports (what is the most secure way to set these up?)
I found a command on this post: /linux-security-4/firewall-blocking-cpanel-login-324429/

iptables -A INPUT -i eth0 -m tcp -p tcp -dport 2082 -j ACCEPT
Is this correct? Let's say eth0 was wrong and I should have used eth1 how do I remove that previous command without messing anything up?

The second question is: I need to setup remote desktop connection to one of our other servers, is this the correct command to use?

iptables -t nat -A PREROUTING -p tcp --dport 3389 -i eth0 \
-j DNAT --to 192.168.50.100:3389


The Linux box was setup in a way to prevent people from sending spam from our server (static ip), so only the server can send mail. This is why I don't want to mess it up.

Thank you so much for your time!

Agrouf 01-19-2009 07:35 AM

http://iptables-tutorial.frozentux.n...-tutorial.html

-D command deletes a rule added with -A

media-c 01-19-2009 01:14 PM

appreciate it
 
Thank you for the link Agrouf. I sure have a lot of reading to do... the main thing is to actually understand what I am reading. Great to have this Forum to search for answers and solutions.

Thanks for the tip.


All times are GMT -5. The time now is 10:35 PM.