Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
02-02-2005, 01:28 AM
|
#1
|
Member
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183
Rep:
|
How to enable a new port
PLZ help me i want to open a new port in my server, apf is already installed there,how can i enable a new port in iptables(it is a cpanel linux server)

|
|
|
02-02-2005, 03:51 AM
|
#2
|
Member
Registered: Feb 2005
Posts: 57
Rep:
|
what do u mean by "opening a new port" or "enable a new port"? do you just want to forward a port adress or what?
as an example, these three lines forward everything that appear on port 4661 to the machine with the ip $hip
Code:
hip=192.168.0.135
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4661 -j DNAT --to-destination $hip
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 4661 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p tcp -d $hip --dport 4661 -j ACCEPT
|
|
|
02-02-2005, 04:14 AM
|
#3
|
Member
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183
Original Poster
Rep:
|
Quote:
Originally posted by freeka
what do u mean by "opening a new port" or "enable a new port"? do you just want to forward a port adress or what?
as an example, these three lines forward everything that appear on port 4661 to the machine with the ip $hip
Code:
hip=192.168.0.135
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4661 -j DNAT --to-destination $hip
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 4661 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p tcp -d $hip --dport 4661 -j ACCEPT
|
This is a webserver , one of our client ask to me open a particular port for his particular needs,i think above mentionted commands are ipforwarding option, i want to open a particular port only
|
|
|
02-02-2005, 07:57 AM
|
#4
|
Member
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183
Original Poster
Rep:
|
|
|
|
02-03-2005, 07:10 AM
|
#5
|
Member
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431
Rep:
|
try with apf support page?!?
Last edited by johnnydangerous; 02-03-2005 at 07:12 AM.
|
|
|
All times are GMT -5. The time now is 08:04 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|