iptables and networking

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help

iptables and networking

Postby jsprenkle on Tue Nov 06, 2012 12:53 am

Good evening,

I'm trying to do a new server install. I have one of the very small acer boxes for hardware.
It isn't expandable but I want an extra network port for connecting to my DMZ.
I purchased a Trendnet TU2-ET100 usb to ethernet dongle.

I plug in the Trendnet box and it appears to work (it's assigned an IP by DHCP).
The existing network connection on the motherboard works as well (it's assigned an IP by DHCP).
I can surf and connect to other machines.

I put in the following iptables script to begin creating my firewall:
Code: Select all
#!/bin/bash
INTERNET_IFACE=eth1
TRUSTED_IFACE=eth0
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
iptables -F -t nat
iptables -A INPUT -i $TRUSTED_IFACE -s 0/0 -d 0/0 -j ACCEPT
iptables -A INPUT -i lo -s 0/0 -d 0/0 -j ACCEPT
iptables -A INPUT -j DROP


This should allow all traffic through eth0.
If I plug the network cable into the trendnet then all networking fails.
If I unplug the network cable then everything works.

How is disconnecting a network cable on interface eth1 breaking all traffic through eth0?

I'm using Mint 12. I get the same behavior on Centos 6.3

Thanks
jsprenkle
Level 1
Level 1
 
Posts: 2
Joined: Tue Nov 06, 2012 12:40 am

Linux Mint is funded by ads and donations.
 

Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 2 guests