LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2003, 07:04 PM   #16
Narf!
LQ Newbie
 
Registered: Jun 2003
Location: Santiago, Chile
Distribution: RedHat 9
Posts: 9

Rep: Reputation: 0

Hey im a newbie to and i have almost the same problem...

i just did this and i just can ping ip's but not url's...

# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
# iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
# echo 1 > /proc/sys/net/ipv4/ip_forward

I used to have that configuration on RH8 and it worked perfect...! but I don't know what happened now...
When i use Windows it works ok so i think it's defenetely an iptables config problem...

I hope you can help me! thanks guys!

Excuse my english please, it's not my native language...
 
Old 06-10-2003, 11:28 PM   #17
jrwu
LQ Newbie
 
Registered: Jun 2003
Location: Vancouver/Toronto
Distribution: Redhat 9
Posts: 15

Original Poster
Rep: Reputation: 0
Anyone else have any ideas? I really need to get this internet sharing working before I can do anything!
 
Old 06-11-2003, 09:08 AM   #18
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
Are you just trying to share the network connection with another computer, or are you wanting this box to act like a router that forwards everything to another computer on the inside of you network.

If you are just sharing the connection, you donot need to add this type of line to your iptables. This is for if your other machine was running a webserver on the inside network, and if you are then this is the ip of that box.
 
Old 06-11-2003, 03:32 PM   #19
jrwu
LQ Newbie
 
Registered: Jun 2003
Location: Vancouver/Toronto
Distribution: Redhat 9
Posts: 15

Original Poster
Rep: Reputation: 0
All I'm trying to do is share the internet connection I have on the RH9 box with win98.
 
Old 06-11-2003, 04:15 PM   #20
jchristman
Member
 
Registered: Mar 2003
Distribution: Fedora Core 3
Posts: 125

Rep: Reputation: 15
then you donot need all alot of stuff in your iptables

all you need is to enable ipforwarding and enable NAT.

this will get you going.

if you do not want to try tackling NAT then install squid (proxy server) on your linux box and run your windows maching through the proxy.
 
Old 06-12-2003, 12:49 AM   #21
jrwu
LQ Newbie
 
Registered: Jun 2003
Location: Vancouver/Toronto
Distribution: Redhat 9
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks, I'll try that!
 
Old 06-14-2003, 10:30 PM   #22
Narf!
LQ Newbie
 
Registered: Jun 2003
Location: Santiago, Chile
Distribution: RedHat 9
Posts: 9

Rep: Reputation: 0
# Reglas para hacer NAT con iptables

echo 1 > /proc/sys/net/ipv4/ip_forward
insmod ip_masq_ftp > /dev/null 2> /dev/null

iptables -F
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP


It worked!
RH9 has default iptables rules, so iptables -F will flush those and let you use your own.

Bye
 
Old 06-14-2003, 10:34 PM   #23
Narf!
LQ Newbie
 
Registered: Jun 2003
Location: Santiago, Chile
Distribution: RedHat 9
Posts: 9

Rep: Reputation: 0
sorry....
# Reglas para hacer NAT con iptables

echo 1 > /proc/sys/net/ipv4/ip_forward
insmod ip_masq_ftp > /dev/null 2> /dev/null

iptables -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP

just copy/paste it on etc/rc.local and you'll get it permanent
 
  


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
Internet Connection Sharing basix Red Hat 2 06-25-2004 09:15 PM
Sharing a win98 internet connection with RH9 sausagejohnson Linux - Networking 3 06-09-2004 01:47 PM
Internet Connection Sharing between win200 and rh9 tricky_linux Linux - Software 1 12-11-2003 10:04 AM
How to check kernel (RH9) is support for Internet connection sharing?? TYLin Linux - Hardware 0 06-18-2003 03:39 AM
Sharing internet connection in RH9 rainmasterrr Linux - Networking 1 04-29-2003 03:14 AM


All times are GMT -5. The time now is 02:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration