LinuxQuestions.org
Help answer threads with 0 replies.
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 05-26-2003, 03:07 AM   #1
sanw2k
Member
 
Registered: Apr 2002
Location: bangy
Distribution: rh 9,,Mandy 9.1, Lycoris
Posts: 42

Rep: Reputation: 15
Cool accessing Intranet web server from extranet (outside the lan)


Hi all!

IS it possible for me to make my intranet pc (192.168.0.1) to act as
web server for internet access, if possible how can i do it,

now i am using linux box as gateway with iptables configured,
i think it is possible with iptables, but i dont know how to do it,
can any one help me out

thanx and regds
san

Last edited by sanw2k; 05-26-2003 at 04:07 AM.
 
Old 05-26-2003, 03:40 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
can you clarify what you're after a bit more... a webserver is a machine that provides webpages to remote internet users, is that what you mean? that'd be apache...

also please use a useful thread title "hi" is of no use whatsoever, thanks.
 
Old 05-26-2003, 04:25 AM   #3
sanw2k
Member
 
Registered: Apr 2002
Location: bangy
Distribution: rh 9,,Mandy 9.1, Lycoris
Posts: 42

Original Poster
Rep: Reputation: 15
LAN web server+port forward

Dear Acid_kewpie!

My basic requirement is,i have one linux gateway connected with DSL and that gateway have two ethernet cards,
one is for Static IP provided by ISP
another one is having LAN ip

In gateway i am using squid as proxy in port 3128

Now few of my users will be going outside office and want to browse our intranet web server carries required info.

After going through some documents and other mates help, i came to know that we can do it by port forwarding,

Then i tried the following
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0-d mystaticip --dport 80 -j DNAT --to-destination mylanip:80

but when i will trying to connect from outside my lan
i am getting my proxy error messages

Where it went wrong how do i proceed?
san
 
Old 05-26-2003, 04:43 AM   #4
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
you would still need to enable ip forwarding in the kernel

echo 1 > /proc/sys/net/ipv4/ip_forward

personally i would suggest using a firewall generator such as firestarter, which is available from sourceforge.net, it will create a functional firewall for you, and also deal with ip forwarding.
 
Old 05-26-2003, 04:49 AM   #5
sanw2k
Member
 
Registered: Apr 2002
Location: bangy
Distribution: rh 9,,Mandy 9.1, Lycoris
Posts: 42

Original Poster
Rep: Reputation: 15
echo 1 > /proc/sys/net/ipv4/ip_forward
already i enabled this along with $root#]route dnsserverip gw..

and i have my own firewall script,
 
  


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



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

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