[Solved] Configure iptables to block traffic on Host
Posted: 23. Jul 2009, 20:59
Hello,
I have a Lenny Host running VirtualBox 3.0.2 and a guest running Lenny too.
At the host, I have this network interfaces:
ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/ether 00:1c:c0:05:04:0e brd ff:ff:ff:ff:ff:ff
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
I want to configure an iptables firewall on the host to protect the host server; and other firewall in the guest to protect the guest (if that is the correct way of protecting the guest)
When I put something like this on the host:
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
echo "Acceso SSH"
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
nothing is bloqued at the host nor on the guest.
How should I configure iptables on the host to protect it?
Hoy should I configure iptables on the guest to protect it too?
Thanks in advance and sorry for my bad english.
Pablo.
I have a Lenny Host running VirtualBox 3.0.2 and a guest running Lenny too.
At the host, I have this network interfaces:
ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/ether 00:1c:c0:05:04:0e brd ff:ff:ff:ff:ff:ff
3: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff
I want to configure an iptables firewall on the host to protect the host server; and other firewall in the guest to protect the guest (if that is the correct way of protecting the guest)
When I put something like this on the host:
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
echo "Acceso SSH"
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
nothing is bloqued at the host nor on the guest.
How should I configure iptables on the host to protect it?
Hoy should I configure iptables on the guest to protect it too?
Thanks in advance and sorry for my bad english.
Pablo.