LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-13-2003, 12:45 PM   #1
zovres
Member
 
Registered: Sep 2002
Posts: 184

Rep: Reputation: 30
redhat would like to share connection with windows


I just installed my modem under redhat8.0 and everything works well but I would like to share this connection with my windows machine.
I've tried to search the forums but find a few too complicated things about that

is there a simple way to share this connection? (I've tried with firestarter without success and the windows machine is properly configured)

any help appreciated =)
 
Old 04-13-2003, 01:31 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Assuming you have a basic working network.

Try:
# Save your current iptables setup
service iptables save
# Remove any current rules
iptables -F
# Enable forwarding of packets from eth0 to ppp0
iptables -A FORWARD -i eth0 -o ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# Enable IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

Then set the Gateway ip on the windows machine to be the same as the linux box. Also set the DNS ip on the windows box to being whatever your isp uses.

If this works then you can set about making the changes more permenant - no reboot on the linux box should be neccessary bu the windows machine may need to be restarted in order for the gateway to change.

If it doesn't work post any error messages and the output from these on linux:
iptables -L
route
cat /proc/sys/net/ipv4/ip_forward

Then on Windows:
route print
 
Old 04-14-2003, 05:12 PM   #3
zovres
Member
 
Registered: Sep 2002
Posts: 184

Original Poster
Rep: Reputation: 30
well, I tried that but when I does it ; my lan doesn't work anymore because I'm unable to access the windows machine with vncviewer and I get Destination Host Unreachable when I try to ping it

cat /proc/sys/net/ipv4/ip_forward
0
--> which is strange =)
_________________________________________________________
./iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
__________________________________________________________
./route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
slc1-tc.xmissio * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default slc1-tc.xmissio 0.0.0.0 UG 0 0 0 ppp0


I really don't think that the problem is coming from the windows machine.

Do you have any idea? and how can I cancel those changes in order to make the lan work again without formating my computer again :\

thx =)
 
Old 04-14-2003, 05:24 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
All you did was flush your firewall rules - if you saved them like I suggeseted then you can just:
iptables -F
service iptables restart

I don't know why the ip_forward was lost - the same with the iptables unless you rebooted the computer.

Did you get any errors when you ran the commands?
 
Old 04-14-2003, 06:29 PM   #5
zovres
Member
 
Registered: Sep 2002
Posts: 184

Original Poster
Rep: Reputation: 30
ok, actually I did reboot the computer... now I did everything again without rebooting, the lan works again (I don't know why =)) but I still cannot browse a website on the windows machine

____________________
./iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
_________________________
./route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
slc1-tc.xmissio * 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default slc1-tc.xmissio 0.0.0.0 UG 0 0 0 ppp0
_______________________
cat /proc/sys/net/ipv4/ip_forward
1
_________________________
C:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x1000003 ...00 50 ba bc f6 a4 ...... Realtek RTL8029(AS) Ethernet Adapt
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.2 192.168.0.3 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.0.0 255.255.255.0 192.168.0.3 192.168.0.3 1
192.168.0.3 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.0.255 255.255.255.255 192.168.0.3 192.168.0.3 1
224.0.0.0 224.0.0.0 192.168.0.3 192.168.0.3 1
255.255.255.255 255.255.255.255 192.168.0.3 192.168.0.3 1
Default Gateway: 192.168.0.2
===========================================================================
Persistent Routes:
None




(btw the ip of redhat is 192.168.0.2 and the one of the windows machine is 192.168.0.3 so that you don't get confused)

I hope I'm not too annoying :\ I really appreciate your help
 
Old 04-15-2003, 12:42 AM   #6
zovres
Member
 
Registered: Sep 2002
Posts: 184

Original Poster
Rep: Reputation: 30
I managed to solve my problem using skyfire-1.0.1 which is a little script that asks you a few questions and configures iptables for you

wonderful thx david_ross, after my exams I'll try to understand this iptable thing, but for the moment this script is perfect =)

linux rocks
 
  


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
Connection to Windows Share (FC3) binjured Linux - Networking 5 12-20-2004 02:58 PM
What must i do in order to be able to share internet connection with RedHat 9? Julian_Thong Linux - Newbie 12 08-21-2004 03:05 AM
share internet connection windows fedora woodshop Linux - Networking 1 07-27-2004 03:27 PM
Share Adsl Connection With Windows Xp myk3 Linux - Networking 3 11-16-2003 09:47 PM
share internet connection on redhat 7.1 rocael Linux - Networking 3 09-28-2001 10:13 AM

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

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