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 09-12-2005, 07:21 PM   #1
ivj
Member
 
Registered: Jul 2004
Posts: 61

Rep: Reputation: 15
How come I CAN view websites (port 80)???


I have an internal network behind a Linux router running iptables.

Now I have no problems, but today I was thinking... How come I can view websites if I have the following rule:

-A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to 192.168.0.33:80

Which's a rule I set up a while ago so I can access my internal comp website from outside...

It works just fine, but how come I am able to open websites from the internal network?

Shouldn't every time I try to connect to a web server, shouldn't my request get thrown to my internal computer?

Thanks!
 
Old 09-13-2005, 04:50 PM   #2
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
It might be related to the ingoing / outgoing traffic (ie: the rule may only apply to one of them). That, or the device is incorrect. Or perhaps the rule isn't present on each system you are trying. Or there is another rule that takes precedence over the one you added (ie: allows port 80 traffif through). I'd suggest taking a very close look at your entire iptables setup.
 
Old 09-16-2005, 08:09 AM   #3
aq_mishu
Member
 
Registered: Sep 2005
Location: Bangladesh
Distribution: RH 7.2, 8, 9, Fedora
Posts: 217

Rep: Reputation: 30
While using NAT and port forwarding, you can get pages using the FQDN (eg. www.domain.com) from out side of the network. But if you try to access it from your lan, then you cannot do it. In that case, you'll have to use the lan ip. Because NAT and portfwd cannot portforward like this way : -
Your LAN IP--->SNAT-->Your WAN IP--->DNAT(port fwd)--->Your LAN server
I do not know why... I'm also facing the same problem. And one solution you can use.... setting us a local dns server that will MAP the FQDN (www.domain.com) to LAN (private IP). {instead of usual any Public IP}.
And there are some devices that provide NAT and virtual server (port fwd). If no other way, u can use them... but they are not very good enough. (personally saying, I changed 2 devices for within 3 months... they cannot take much load.)
 
Old 09-16-2005, 08:36 AM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
The people over in Linux - Networking might be able to better respond to this. I'm moving this there.
 
Old 09-16-2005, 01:53 PM   #5
aq_mishu
Member
 
Registered: Sep 2005
Location: Bangladesh
Distribution: RH 7.2, 8, 9, Fedora
Posts: 217

Rep: Reputation: 30
Vgui,
You can set your iptables to NAT from real ip --> lan and also do not forget to forward the packets. Then you can try the packeg ipvsadm coming with the RH8 or later Releases. Try to search in google for the man page of ipvsadm and you'll get what you need, I hope. T'll also start to try with it.
 
  


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
W2K cannot view samba share but can view NT FiveFlat Linux - Software 3 06-10-2005 02:54 PM
Unable to view websites/connect to servers fwm-support Linux - Newbie 1 02-10-2005 08:08 AM
How to view websites saiz66 Linux - General 1 09-29-2004 05:10 PM
port 80 is stopping me from loading most websites xxvm1 Mandriva 4 09-15-2004 03:00 PM
Websites that sell websites..? mScDeX General 2 12-29-2003 03:01 PM

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

All times are GMT -5. The time now is 02:18 AM.

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