LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-17-2011, 09:18 PM   #1
mad_penguin
Member
 
Registered: Mar 2008
Posts: 69

Rep: Reputation: 15
help on iptables


Hi

I'm on a dilemma and I really don't know where to pull my hat.
So, I'll try to be short and concise.
I have a web-server listening on default port behind a firewall (netfilter/iptables). I have made a port forward on router to web-server like this: -A PREROUTING -i eth0 -d xx.xx.xx.xx -p tcp --dport 80 -j DNAT --to-destination 192.168.7.128:80
It's working fine from internet but I can't access my website from lan.
All lan hosts go thru a proxy before hitting the internet but all website's work just our website, behing network doesn't.
This is the rule that forces lan hosts to go thru proxy:
-A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.7.125:8080
What should I look for ? It worked before when I had httpd installed on current firewall box but.
 
Old 02-18-2011, 01:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'd think that as you're apparently behind both of these boxes you're having asymmetric routing as there is no source nat. so your request heads out towards the net, gets bounced back via iptables to the internal host. The internal host then knows your real source IP address so forwards the traffic directly back to you, which could cause plenty of issues with other routers in the way. Also though, you've not mentioned an "inside" interface rule for this redirect, should you not be prerouting on eth1 as well as eth0 on this "router" box?
 
1 members found this post helpful.
  


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
iptables can't initialize iptables table `filter': Bad file descriptor donalbane Linux - Networking 2 08-17-2011 08:36 AM
On what basis CHAIN integer values are generated in IPtables under iptables file? haariseshu Linux - Server 3 11-05-2009 04:25 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

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

All times are GMT -5. The time now is 04:18 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