LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-02-2005, 01:28 AM   #1
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
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)

 
Old 02-02-2005, 03:51 AM   #2
freeka
Member
 
Registered: Feb 2005
Posts: 57

Rep: Reputation: 15
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
 
Old 02-02-2005, 04:14 AM   #3
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Original Poster
Rep: Reputation: 31
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
 
Old 02-02-2005, 07:57 AM   #4
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Original Poster
Rep: Reputation: 31
This is a cpanel linux iptables+apf is running fine,already i enable one egress port in apf configuration file, but it is not lisiting when i try to list the open ports.


Any ideas
 
Old 02-03-2005, 07:10 AM   #5
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
Arrow

Quote:
Originally posted by hardcorelinux
This is a cpanel linux iptables+apf is running fine,already i enable one egress port in apf configuration file, but it is not lisiting when i try to list the open ports.


Any ideas
try with apf support page?!?

Last edited by johnnydangerous; 02-03-2005 at 07:12 AM.
 
  


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
how to enable port forwarding linetnew Linux - Networking 1 05-26-2005 05:20 AM
Cannot enable USB port RedAhead Linux - Hardware 1 10-06-2004 07:37 PM
enable port inq Robin01 Linux - Newbie 4 01-01-2004 02:57 PM
How to enable a port on Mandrake?? datapulse Linux - Newbie 4 08-31-2003 02:02 PM
Anyone know how to enable port 25 nnadeau Linux - Security 8 01-11-2002 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:04 AM.

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
Open Source Consulting | Domain Registration