LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-10-2003, 10:15 PM   #1
Oxagast
Member
 
Registered: Aug 2003
Location: Mocksville, NC, USA
Distribution: Gentoo, Slackware.
Posts: 410

Rep: Reputation: 30
sharing internet through eth0 to sl0, iptables wont work


here is my setup:
I have one windows xp machine that runs ics (connected through dialup, and has an eithernet card connected to the gentoo box) and my gentoo box is routed through it, and attached to the gentoo box over a serial cable (null modem) wtih slip (slattach) is an old laptop without a nic, i can see the internet with the gentoo box fine, but i wish to be able to have the delilinux box (old laptop) be able to access the internet as well through it's null modem connection. i have fooled around with iptables and such and tried
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
but that only comes back and says
iptables: Invalid argument
i was thinking it would be the same as trying to say, have a dsl modem attached to the eth0 on a linux box, and have eth1 share internet to the rest of the network, except wtih eth0 connected to the windows machine, and sl0 connected to the delilinux, but i cant seme to make it work. the delilinux box will ping to and fro with the gentoo box fine, and gentoo box will ping to and fro with windows xp box, but i cant make delilinux ping windows, nor anything else outside the gentoo/delilinux link.
can someone give me some detailed information on how this should all be set up?
thanks
-ox
 
Old 08-10-2003, 11:38 PM   #2
jalal
Member
 
Registered: Aug 2003
Location: .bh
Distribution: Gentoo
Posts: 188

Rep: Reputation: 30
do you have ip forwarding enabled ?

check if /proc/sys/net/ipv4/ip_forward = 1

also, if you are using nat through static connection (eth0), i think you will need -j SNAT instead of MASQUERADE.
 
Old 08-11-2003, 07:36 PM   #3
Oxagast
Member
 
Registered: Aug 2003
Location: Mocksville, NC, USA
Distribution: Gentoo, Slackware.
Posts: 410

Original Poster
Rep: Reputation: 30
i had /proc/sys/net/ipv4/ip_forward set to 1, and i tired the -j SNAT option instead of MASQUERADE but it didn't seem to make much differance, now after messing with it for a while i have screwed something up and everytime i start iptables i cant get to anything like there is a rule blocking everything, i tired to flush it wtih -F but it did'nt seem to make much differance, and iptables -L (or iptables -t nat -L) dont show antyhing in there.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Dhcp eth0 and XP eth1 internet sharing props666999 Slackware 8 08-20-2005 09:48 AM
Let sl0 use eth0 in lan nl1at Linux - Networking 3 08-10-2005 09:00 AM
Internet Sharing with iptables? can it be done? sitmex Linux - Networking 3 03-09-2004 04:25 PM
Sharing internet connection with iptables chatmanpk Linux - Networking 2 09-27-2003 05:30 PM
Internet connection sharing with iptables specialmunky Linux - Newbie 10 10-29-2002 01:10 PM

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

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