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 09-18-2007, 04:32 AM   #1
prashsharma
Member
 
Registered: Sep 2006
Posts: 38
Blog Entries: 1

Rep: Reputation: 15
unable to provide access to windows computer


Hi,
I have one computer with Linux 4.0 entprise edition and other with windows XP pro. How can I allow windows computer to connect to Internet through Linux computer. Can I use Squid with windows? And also I can I edit windows created file alter in Linux?

Thanks
 
Old 09-18-2007, 08:31 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by prashsharma View Post
I have one computer with Linux 4.0 entprise edition and other with windows XP pro. How can I allow windows computer to connect to Internet through Linux computer.
You can use iptables to configure the Linux box as a NAT router.

Quote:
Can I use Squid with windows?
Yes, you can.

Quote:
And also I can I edit windows created file alter in Linux?
I'm not sure what you mean. =/
 
Old 09-19-2007, 01:00 PM   #3
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
But how can I do that? Can you provide m the steps?
 
Old 09-19-2007, 01:22 PM   #4
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by prashsharma View Post
But how can I do that? Can you provide m the steps?
I actually provided two links to give you a good idea of what you're up against. The links are to the relevant pages of the RHEL 4.0 manual. Did you even look at them? The most basic iptables configuration to provide NAT to a LAN would go something like:
Code:
iptables -P FORWARD DROP
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $LAN_IFACE -o $WAN_IFACE -m state --state NEW -j ACCEPT
iptables -t nat -A POSTROUTING -o $WAN_IFACE -j MASQUERADE
To enable IP forwarding, you do a:
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
If you want a page that explains what NAT is, click here. For a good iptables tutorial, click here. The tutorial is relatively advanced, don't think that you need to master everything in it. But you definitely should have a good general understanding of what iptables is and how it works. Any other information you need to get this working is just a Google away. Or search through the forums here at LQ because these types of setups are covered quite often.

Asking for a step-by-step is a pretty tall order, you will have much better chances of getting help if you first read-up on this, then give it a shot, and then come-back with specific questions about any snags you hit along the way.
 
Old 09-19-2007, 03:34 PM   #5
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
reply

But I have disabled Firewall and till unable to access Internt from the windows compute and 2d qusetion: I have created a Microsoft word file in windows, but how can I open this file in Linux

Thanx
 
Old 09-19-2007, 03:43 PM   #6
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
just disabling a firewall is not going to be sufficient. you need to follow the document that you have been linked to. you then also need to configure the windows machiens to use it correctly. if you can confirm which parts you have and have not done then we can easily look to work out if anything else is awry. you may benefit from describing what sort of access you actually want, principally routing (iptables) or proxying (squid)

for word documents, try openoffice.
 
Old 09-20-2007, 05:30 PM   #7
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
reply( urgent please)

issue still persist...........

Let me explain you again.
I have 2 computers
Linux : has two Ethernet cards : eth0: IP provided by DHCP( through by ISP), eth1: Ip address : 192.0.0.1
Windows XP pro: IP address 192.0.0.2

Now I want to access Internet through windows. When I try to access get message from Internet Explorer " Connection refused".

And also please provide me that what all steps should I follow now to access Internet on my windows computer?

Thanx
 
Old 09-20-2007, 06:03 PM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Configure the Linux box to do NAT using the links and info above. Then configure the gateway address on the Windows box to be the IP of the LAN interface (eth1) on the Linux box. Set the Windows box's DNS servers to be the same as what the Linux box uses. That's pretty much it.
 
Old 09-20-2007, 06:45 PM   #9
prashsharma
Member
 
Registered: Sep 2006
Posts: 38

Original Poster
Blog Entries: 1

Rep: Reputation: 15
reply

It does not work that is why I explained it in detail..........
 
Old 09-20-2007, 07:47 PM   #10
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Please post the output of all these commands from the Linux box:
Code:
iptables -nvL
Code:
iptables -t nat -nvL
Code:
cat /proc/sys/net/ipv4/ip_forward
Code:
ifconfig
Code:
ping -c3 linuxquestions.org
Code:
ping -c3 192.0.0.2
Make sure the Windows box is turned-on when you run the last command. BTW, if you are concerned about having the WAN IP from the ifconfig command posted here please edit the last segment or two of it. For example, instead of 64.233.187.99, have it show 64.233.xxx.xxx. Also, please use code tags when you post these outputs.

Last edited by win32sux; 09-20-2007 at 08:03 PM.
 
  


Reply

Tags
firewall, iptables, routing



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
how to provide sudo access mokku Linux - Newbie 1 09-12-2007 02:09 PM
Unable to write to hardrive from windows computer - uber newb violettheconqueror Linux - Hardware 4 09-23-2005 06:54 PM
open_basedir - how do I provide limited access to other directories? benbroad Linux - Software 4 12-08-2004 06:07 AM
Unable to ftp from Windows computer doodle77 Red Hat 3 06-20-2004 05:40 PM
Unable to access local intranet computer by name thru squid MgF Linux - Networking 1 08-18-2003 08:31 PM

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

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