I want to add whitelist in my system using iptables. So I searched the web and find this:
iptables -I INPUT -s 10.0.0.0/8 -j ACCEPT
iptables -I INPUT -s 127.0.0.1/8 -j ACCEPT
iptables -I INPUT -s 192.168.0.0/16 -j ACCEPT
iptables -P INPUT DROP
and it really works. So I fire iptable -F to delete all rules, then I cannot connect to this server anymore.
I want to setup a VPN server for personal use, so I follow the blog article [1], and it work like a charm.
The only thing I am wondering is if the iptable's rule secure, e.g.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
And I have only one public interface eth0, are there any risk in using the rule above?
From other place, I see other alternatives of iptable rules, e.g.
1.
sudo ipta
I'm on a simple linux proxy. I'd like to add iptable rules to drop all requests for a specific domain. I figured I run a dig command to get the ip addresses for the domain and then add an iptable rule for each one. It seems, however, that it doesn't work to bind to more than one ip address.
I am running a server which needs UDP ports 1000:11000 opened, as well as TCP 10011 and 30033 open to function.
I have a set of iptables rules set to allow SSH and those ports, and intentionally left out 2010 as I am getting attacked on that port. The server does not block the incoming IP even when told to do so.
i'd like to basically drop all packets, but still allow port 22, 80 and 52533. ATM this firewall doesn't allow pinging, or for me to use yum update. How can I add that? Thanks for advice. Also is there an easier way to open port 80?
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
Hi
I'm having some problems with my VPS running Ubuntu Server 11.04 x64.
I'm trying to set up iptables to block all traffic except ssh but, no matter what I do, it's blocking outgoing ssh. The commands that I'm using are shown below. Oddly, I can SSH into the box, just not out.
Possible Duplicate:
iptables: forward port 80 to port 8080
I'd like to forward port 80 to 8080.
So I tried to edit /etc/syscongfig/iptables:
-A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
But got:
# service iptables restart
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK