Firewall Tunning

Protecting your Linux box
Post Reply
ilias
Lance Naik
Posts: 42
Joined: Tue Jul 05, 2005 9:18 pm

Firewall Tunning

Post by ilias »

I have installed transparent squid proxy server with necessary firewall script not to allow any request from outside and unknown request using the following commands

#----------Blocking unknown request----------------------
iptables -A INPUT -i eth0 -p tcp --syn -j DROP

#---------Blocking Incoming outside request--------------
iptables -A INPUT -p tcp --destination-port 3128 -i eth0 -j DROP

but now i want to allow one IP(head office ip) with all ports to access. Can any one tell me what's the command
AsadRasheed
Battalion Quarter Master Havaldaar
Posts: 228
Joined: Fri Jan 28, 2005 6:23 pm
Location: Karachi

salam

Post by AsadRasheed »

Dear ilias,

Try this bro,

iptables -A INPUT -p tcp -i eth0 --source 192.168.0.1 -j ACCEPT

and check this

http://www.faqs.org/docs/linux_network/ ... ample.html

Regards,
M Asad Rasheed
registered linux user #394856
http://www.bsdpakistan.org
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear ilias,
Salam,
AsadRasheed wrote:iptables -A INPUT -p tcp -i eth0 --source 192.168.0.1 -j ACCEPT
I think he should need udp protocol as well if he doing voice communication and also for DNS queries !!

# iptables -I INPUT -s 192.168.0.1 -i eth0 -j ACCEPT

Best Regards.
Farrukh Ahmed
AsadRasheed
Battalion Quarter Master Havaldaar
Posts: 228
Joined: Fri Jan 28, 2005 6:23 pm
Location: Karachi

Re:

Post by AsadRasheed »

LinuxFreaK wrote:Dear ilias,
Salam,
AsadRasheed wrote:iptables -A INPUT -p tcp -i eth0 --source 192.168.0.1 -j ACCEPT
I think he should need udp protocol as well if he doing voice communication and also for DNS queries !!

# iptables -I INPUT -s 192.168.0.1 -i eth0 -j ACCEPT

Best Regards.
May be , who knows.

Regards,
M Asad Rasheed
registered linux user #394856
http://www.bsdpakistan.org
lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Post by lambda »

input rules make no sense at all here. he should use forward or postrouting rules.
LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Post by LinuxFreaK »

Dear lambda,
Hello,
lambda wrote:input rules make no sense at all here. he should use forward or postrouting rules.
Right but its just for an example !!

Best Regards.
Farrukh Ahmed
Post Reply