I'd like to allow mail through iptables and DROP policy but this script doesn't work what it is wrong here:
## FLUSH de reglas
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
## policy
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
# localhost
iptables -A INPUT -i lo -j ACCEPT
# Allow my ip
iptables -A INPUT -s MY_IP -j ACCEPT
# 80 port
iptables -A I
I have these drop rules:
iptables -t mangle -P FORWARD DROP
iptables -P FORWARD DROP
iptables -t mangle -P INPUT DROP
iptables -P INPUT DROP
iptables -t mangle -P OUTPUT DROP
iptables -t nat -P OUTPUT DROP
iptables -P OUTPUT DROP
iptables -t nat -P PREROUTING DROP
iptables -t mangle -P PREROUTING DROP
iptables -t nat -P POSTROUTING DROP
iptables -t mangl
Current setup
Centos which is a Web, Mail (Postfix,Dovecot), FTP Server and Gateway with public ip and private ip (for LAN Gateway).
We are planning to implement external firewall box and bring the server to LAN
Please guide on configuring IPTables...
I am using ipset in conjunction with iptables to create a list of IPs I want to block. I did this:
ipset -N blocking iphash
ipset -A blocking 124.205.11.230
// and repeated this line for all IPs I want to add to "blocking" list
now I have to add this rule to iptables
if I do this
iptables -A INPUT -m set --set blocking src -j DROP
the IPs will be blocked for everything SSH, FTP, etc.
I need to setup IpTable Rules for a server with nginx, ssh and sendmail.
Now, the problem is, with my rules I can not send emails to other hosts anymore.
Emails to localhost do work, but sending to different servers does not, when the firewall is up.
I tried opening both Incoming and Outgoing Port 25 and DNS lookup ports, but nothing worked.
Any ideas?
Update:
Here are my rules:
#!
I am setting up a new squid daemon to run on my server. I want to make sure that everyone inside my network can access squid but I want to make sure everyone on the internet is blocked.
Hi
I'm having some problems with my VPS running Ubuntu Server 11.04 x64.
In my office all are using facebook and some other site that we don't want to be. Form the server pc, I used to share my net through the /ect/rc.local file.
I'd like to mention that im really new to this so please bear with me. I'm trying to setup a forum software to send emails via postfix but I think my server has the port 25 blocked.