Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 01-30-2007, 11:15 AM   #1
LQ Newbie
Registered: May 2004
Location: Gatineau, QC
Distribution: Ubuntu 6.10
Posts: 25

Rep: Reputation: 15
Unhappy Broken iptables config

Hi all,

This week, I had been fiddling with my iptables configuration, and I've inadvertently done something Bad(TM). As the system is right now, I am able to NAT anything coming from my network going to the internet, however any connection originating from the host will not even get to the ISP gateway.

I believe the problem is related to me dropping all configurations in the `nat` table, due to a bad rule I'd left hanging around some time ago, but I can't be sure.

iptables -t nat -F

I'm not sure what else I might have lost, nor do I know how to restore it.

Could someone describe the necessary iptables rule to be able to restore this type of connection?

Best regards,

Last edited by matrixcubed; 01-30-2007 at 11:24 AM.
Old 01-30-2007, 11:23 AM   #2
LQ Newbie
Registered: May 2004
Location: Gatineau, QC
Distribution: Ubuntu 6.10
Posts: 25

Original Poster
Rep: Reputation: 15
This is an example of a (trimmed down) basic iptables script I use:

# LAN subnet

# Loopback address

# Ethernet interfaces

# Delete old iptables rules and temporarily block all traffic
iptables -P OUTPUT DROP
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -F

# Set default policies
iptables -P INPUT ACCEPT
iptables -P FORWARD DROP

# Masquerade local subnet
echo 1 > /proc/sys/net/ipv4/ip_forward


linux, networking, ubuntu

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the iptables config file? huxflux SUSE / openSUSE 4 06-20-2006 06:24 AM
iptables config ? ryanjliles Linux - Networking 2 09-01-2005 05:45 AM
iptables module config swmok Linux - Networking 3 04-17-2005 09:42 AM
iptables Masquerade Broken in Mandrake 10? lnxconvrt Mandriva 7 06-10-2004 07:33 AM
iptables config - RTT Linux - Security 2 01-10-2004 03:40 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration