![]() |
Code:
# (1) PoliciesWhat linux distribution and version are you using? |
Dear Sir,
Thanks for the help we are using redhat linux enterprise server 3 Ratan |
To see what services are turned on at boot:
chkconfig --list | grep on To keep a service off at boot: chkconfig service_name off To turn a currently running service off: service service_name stop Wrt you firewall, what are you using port 53 for? Are you actually hosting a DNS server on-site or was that meant to allow communication with a remote DNS server (like at your ISP)? |
Dear Sir,
Good to hear from you instantly. I have some doubts about the text written by you. **Wrt you firewall, what are you using port 53 for? Are you actually hosting a DNS server on-site or was that meant to allow communication with a remote DNS server (like at your ISP)? Yes we have dns at isp site, tro be used. **#^--Basically same as having a default OUTPUT policy of ACCEPT (not real secure) How i can make it real secure? Thanks again Ratan |
First of all you need to NOT get your firewall rules from a Red Hat Linux 9 Bible. Second of all you need to read the man pages on iptables. I'm sitting here and reading the exact same thing from the book you have written. I know it's some place to start but honestly read the man pages and do some google searches on it.
|
**Wrt you firewall, what are you using port 53 for? Are you actually hosting a DNS server on-site or was that meant to allow communication with a remote DNS server (like at your ISP)?
Yes we have dns at isp site, tro be used. Ok. Since you are a DNS client, you don't want to allow completely open access to DNS (port 53). Limit the source address on incoming packets to your ISP or ideally to your ISPs name servers. Also because incoming traffic to port 53 should only be in response to DNS lookups, it will be using a source port of 53 not the destination port (if you were were running a DNS nameserver it would be the reverse. So the rule you need is: iptables -A INPUT -p UDP -i eth1 -s <Your_ISP> --source-port 53 -j ACCEPT **#^--Basically same as having a default OUTPUT policy of ACCEPT (not real secure) How i can make it real secure? By limiting outgoing traffic to only those protocols that are necessary. This can be very difficult though. You'll need a list of all the types of traffic that will be leaving the server and write indivdual rules for each one instead of allowing all outgoing packets. I'd highly recommend getting your firewall working properly first and then try locking down outgoing traffic. Based on your current rules you'll need at least: iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -p tcp --sport 20 -d x.x.x.x1 -j ACCEPT iptables -A OUTPUT -p tcp --sport 21 -d x.x.x.x1 -j ACCEPT iptables -A OUTPUT -p tcp --sport 22 -d x.x.x.x1 -j ACCEPT iptables -A OUTPUT -p tcp --sport 53 -d <Your_ISP> -j ACCEPT iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT iptables -A OUTPUT -p tcp --sport 2074 -j ACCEPT iptables -A OUTPUT -p tcp --sport 4000 -j ACCEPT iptables -A OUTPUT -p icmp --icmp-type 8 -j ACCEPT *Usually this list can beome much larger depending on your requirements |
Lot of thanks to you, Sir Capt_Caveman.
I think I have got the right inputs from you, Mr. InEeDhElPlInUx and all others who contributed to this thread of mine. Speciaql Thanks are due to chort of transferred my orignal thread from other forum. I will come again in case of doubt. Thanks again to all of you. Ratan |
| All times are GMT -5. The time now is 06:23 PM. |