LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-01-2011, 10:54 AM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
How can i allow all port in firewall rules


Hi
how can i allow all ports for a single domain using firewall rules

-A RH-Firewall-1-INPUT -s xx.xx.xx p tcp -m state --state NEW -m tcp --dport 2211 -j ACCEPT

i could int find out which all the ports my server was running on how can i allow all ports using rh firewall

Last edited by jsaravana87; 11-02-2011 at 05:06 AM.
 
Old 11-01-2011, 12:25 PM   #2
shaticus
LQ Newbie
 
Registered: Mar 2011
Posts: 11

Rep: Reputation: 0
If you remove the --dport 2211 from the above rule, the firewall should allow all traffic from the 58.68.21.67 machine through.
-A RH-Firewall-1-INPUT -s 58.68.21.67 -p tcp -m state --state NEW -m tcp -j ACCEPT

Off the top of my head, to allow network traffic to pass for an entire domain, I would use:
-A RH-Firewall-1-INPUT -s 58.0.0.0/255.0.0.0 -p tcp -m state --state NEW -m tcp -j ACCEPT

you may need to adjust the -s 58.0.0.0/255.0.0.0 based on your network configuration.


Also, I would not recommend using firewall rules that allow all traffic to your machine from the domain in this manner. In my opinion, this could leave a lot of services unprotected if a hacker were to spoof an IP address on your network. I would recommend specifying the ports for the services you want people to access. I can try to give you a hand with this if you want.

HTH

Last edited by shaticus; 11-01-2011 at 12:33 PM. Reason: reworded post
 
  


Reply



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
rules port 25 and port 110 yoyoman0606 Linux - Newbie 16 12-17-2010 04:28 PM
rules for port 25 and port 110 yoyoman0606 Linux - Server 0 12-02-2010 10:15 PM
Used Firewall rules for port 21 bkcreddy17 Linux - Newbie 5 11-18-2008 01:15 AM
Firewall Rules studpenguin Linux - Security 0 07-01-2004 03:14 AM
help with firewall rules please deuce868 Linux - Security 1 06-14-2004 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:42 PM.

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