Results 1 to 25 of 25
Thread: Opening A Port
-
08-25-2007, 09:16 AM #1Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Opening A Port
Hey, I'm trying to open a post on my Unix box to run an application but am having the worst time.
iptables -I INPUT -p tcp -m tcp --dport PORTNUMBER -j ACCEPT
Does not appear to be working.
Any tips?NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 09:19 AM #2Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
Is your box running a firewall. For a port to be closed I assume it is and you will need to open that port in the firewall. If you are running a firewall knowing which one would help us tell you how to do this.
█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 09:20 AM #3Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Hmm, okay. I do believe it is running a firewall =D Not sure how to check which one it is though..
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 09:23 AM #4Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
On Linux machines APF seems to be the most popular. Try running the command service apf restart and post the output. Also what "flavor" of linux are you running?
█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 09:29 AM #5Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
[root@newinst ~]# apf restart
-bash: apf: command not found
[root@newinst ~]#
Red Hat Enterprise Linux 4 ASNuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 09:30 AM #6Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
It should look like this:
[root@newinst ~]# service apf restart█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 09:33 AM #7Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
[root@newinst ~]# service apf restart
apf: unrecognized serviceNuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 09:40 AM #8Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
If you are running cPanel, you might be using ConfigServer Security&Firewall. If you are running cPanel, look under plugins in the left hand toolbar and see if it is listed there. If it is not, try asking your server provider or whoever would have installed the firewall.
█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 09:41 AM #9Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Alright, I'll check, but I know I'm running Plesk 8.2 not cPanel.
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 10:18 AM #10Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Alright, I checked and saw that I didn't have APF installed so I installed it, but not none of the sites on the server are loading up, so I ran a reboot and it still hasn't loaded back up. And I haven't been able to login to SSH yet.
These are the instructions I followed: http://www.eth0.us/apf
Edit: Okay, I can get back into SSH and FTP but web access to the files aren't showing. (port 80)NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 10:18 AM #11Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Use this command.
iptables -I INPUT -p tcp -s 0/0 --dport PORTNUMBER -j ACCEPT
service iptables save.
Now start the application that runs on this port.
check it using
telnet localhost portnumberDavid | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-25-2007, 10:22 AM #12Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
It seems you have not configured the apf properly. Please remember it is always safe to add your ISP ip or the proxy IP to the file /etc/apf/allow_hosts.rules , so that you can login to the server even if some apf rule go crazy.
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-25-2007, 10:27 AM #13Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 10:31 AM #14Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
If you have another firewall on the machine I would not install apf on top of it.
█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 10:37 AM #15Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
I've disabled APF for the time being, sites are back to loading.
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 10:48 AM #16Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
Open the apf conf file and make sure the ingress ports section contain all the necessary ports that needs to be opened. You may go through a tutorial that explains apf configuration in plesk.
David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-25-2007, 11:11 AM #17Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Ahh
I see
# Example:
# IG_TCP_CPORTS="21,22,25,53,80,443,110,143,6000_7000,1934,1935,1936"
# IG_UDP_CPORTS="20,21,53,123"
# IG_ICMP_TYPES="3,5,11,0,30,8"
# Common inbound (ingress) TCP ports
IG_TCP_CPORTS="22,1934,1935,1936"NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 11:44 AM #18Web Hosting Guru
- Join Date
- May 2006
- Posts
- 275
You will need to open inbound and outbound ports. But, since you said you thought there was already a firewall on the server, I would not recommend running APF until you verify that there is not another firewall on the server.
█ Patrick Kautz - Galaxy-Solutions, LLC
█ Quality dedicated servers at an affordable price (http://galaxy-solutions.net)
█ Out of this world hosting at down to earth prices (http://galaxy-hosts.com)
-
08-25-2007, 11:57 AM #19Web Hosting Master
- Join Date
- Oct 2004
- Location
- Kerala, India
- Posts
- 4,771
NuPixel,
For plesk, the below line should be fine.
IG_TCP_CPORTS="20,21,22,25,53,80,110,143,443,3306,8443,35000_35999"
UDP ports should be enabled by default. Named uses it.David | www.cliffsupport.com
Affordable Server Management Solutions sales AT cliffsupport DOT com
CliffWebManager | Access WHM from iPhone and Android
-
08-25-2007, 12:45 PM #20Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com
-
08-25-2007, 07:26 PM #21Disabled
- Join Date
- Apr 2007
- Location
- Everywhere
- Posts
- 273
Hi Nupixel,
try this command I just tried it and works fine:
iptables -D INPUT -i eth0 -p tcp --destination-port XX -j DROP
this will open and allow access to this port.
* change eth name as needed, to check it use "ifconfig" command, also add the new port to your apf conf file .
Thanks
-
08-25-2007, 07:35 PM #22Engineer
- Join Date
- Jan 2005
- Location
- Scotland, UK
- Posts
- 2,681
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com
-
08-25-2007, 07:44 PM #23Disabled
- Join Date
- Apr 2007
- Location
- Everywhere
- Posts
- 273
Scott:
Are you sure?
iptables -D INPUT -i eth0 -p tcp --destination-port XX -j DROP
"notice the -D flag."
you can read more about iptables, try it on your test box and it will work.
-
08-26-2007, 04:06 PM #24Engineer
- Join Date
- Jan 2005
- Location
- Scotland, UK
- Posts
- 2,681
Server Management - AdminGeekZ.com
Infrastructure Management, Web Application Performance, mySQL DBA. System Automation.
WordPress/Magento Performance, Apache to Nginx Conversion, Varnish Implimentation, DDoS Protection, Custom Nginx Modules
Check our wordpress varnish plugin. Contact us for quote: sales@admingeekz.com
-
08-26-2007, 08:57 PM #25Junior Guru
- Join Date
- Jun 2005
- Location
- Ohio, USA
- Posts
- 217
Well guys, thanks a lot. I've got it figured out and its' working fine.
NuPixel - Custom Web Design & Graphics
▌Extraordinary, Not Ordinary ▌
Web & Graphic Design, HTML, XHTML, CSS, Script Customization & Integration + More!
Click Today! --> NuPixelStudios.com