LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2008, 07:18 PM   #1
Undeadzz
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Rep: Reputation: 16
flaky iptables?


192.168.192.1/8 web server connects to below
<-->192.168.192.2/8||10.1.1.2/16 firewall connects to web&proxy
<-->10.1.1.1/16||45.45.45.45/24 accelerator proxy to firewall&internet
<-->45.45.45.1 me(show me the website)

default gateway on proxy is firewall
default gateway on firewall is proxy
==webserver==
everything works

==firewall==
echo 1 > /proc/sys/net/ipv4/ip_forward
#TRY get website from firewall
telnet 192.168.192.1 80
#results:worked
GET / HTTP/1.1
#400 Bad Request
#Ping requests are answered

==proxy==
#TRY access website from proxy
telnet 192.168.192.1 80
#results: unable to connect to remote host connection refused
#Once in a while i magically get through through but on second attempts it #closes back up again??
#Ping requests are answered
---------------------
I tried getting the iptables to work on the firewall but it is not solid. Sometimes try telnet from proxy and bam, im able to get telnet session. try again and access denied(then it closes for another 5-10 mins???)
These are the tables I have been trying out so far(FAILED). Maybe somone can help me get this working?

iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth2 -o eth1 -m state --state ESSTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -i eth2 -p all -j REDIRECT --destination 10.1.1.1
iptables -t nat -A PREROUTING -i eth1 -p all -j REDIRECT --destination 192.168.192.1
 
Old 04-30-2008, 11:52 AM   #2
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Are you sure the problem is IP tables? When I'm debugging network issues I'll turn off IPtables just to be sure everything else is okay. Then I add one line at a time and start the service and see if I get the expected result.
the command:
service iptables stop
should stop it for you.
to restart, service iptables start.
 
  


Reply



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
flaky wireless mcd Linux - Laptop and Netbook 5 10-19-2007 08:14 AM
Flaky Control Panel klasact Linux - Newbie 1 06-25-2006 04:54 AM
samba permissions are flaky Red Squirrel Linux - Software 3 02-04-2006 05:05 PM
Flaky Keyboard mernst Linux - Hardware 0 10-20-2005 03:43 PM
6800go startup is flaky exodist Linux - Laptop and Netbook 3 07-26-2005 08:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:24 PM.

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