LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   internet sharing (https://www.linuxquestions.org/questions/linux-newbie-8/internet-sharing-20783/)

jetfreggel 05-12-2002 01:33 PM

internet sharing
 
i have a problem with internet sharing.
i've followed the ip-masquering how-to
and made my own changes cause i use a usb modem
(adsl usb speedtouch) but i can't get it working
i have 1 other system connected with win 98
linux system: 192.168.0.1 ip
win 98: 192.168.0.2
internet provider uses dns
does has redhat 7.2 or 7.3 ipmasquering in his installation
or do i have to compile a new kernel and how do i
set up my client

esteeven 05-12-2002 01:49 PM

After lots of frustration (at myself and lack of knowledge!!!) setting up Internet sharing with SuSE 7.3 and Mandrake 8.2, I was directed towards (directed by this forum) http://firestarter.sourceforge.net - This software set up masquerading in 10 seconds - and by playing around with it (ie breaking it!) I think I understand a little more of the principles behind the set up of masq. Check it out - there are other alternatives at Sourceforge. Good luck!

jetfreggel 05-13-2002 08:03 AM

thank you for the advice but
it didn't work when i rebooted my system , i got a lot
(a lot ) of error when init starts firestarter.

fatgod 05-13-2002 09:10 AM

Hi buddy,

You can find good instructions on howto setup the speedtouch here...

http://speedtouch.sourceforge.net

I recommend using the following in your adsl file that's called by pppd...

noipdefault
defaultroute
pty "/usr/local/bin/pppoa3 -vpi X -vci XX"
sync
user "xxxxx@xxxx.xxxxxxx.xxx"
novjccomp
noaccomp
nopcomp
nomagic
noccp
usepeerdns
holdoff 120
asyncmap 0
maxfail 10
idle 0
persist
lcp-echo-failure 10
lcp-echo-interval 600
lcp-restart 300

Just set the vpi vci for your country and your username.


Anyway you can then share the connection with your windows box by running the following line after the connection is made...

ipchains -A forward -i ppp0 -s 192.168.0.2 -j MASQ

This works well for me ;)

also check out the dynamic DNS options on dyndns.org if you want a free hostname to attach to your box.

Set up the client by setting the default gateway to 192.168.0.1 and setup the DNS entry to whatever the ISP delivers to your server. It's listed towards the end of the connection response on your server.

That's it, let us know how you get on ;)

jetfreggel 05-13-2002 12:01 PM

it didn't work
got no error's , but how did you
set up you client

fatgod 05-13-2002 12:42 PM

I can help you but I need to know more about your problem. Such as,

1. Does the modem work on your linux box?

2. Does the network work ok? can you ping each box?


jetfreggel 05-13-2002 01:31 PM

yeah i can connect to internet
and i can see my windows box and wondows can see my
linux box (with ping offcourse)
i used the latest driver of bennoit's site and i use speedmgt
from alcatel and i even changed the adsl file to your
configuration and internet kept working
but i can't get my win98 online threw linux
only when i use win 98 on two systems and allround98.
but i don't want use windows anymore on my system
please help me i am very desperite
(i used firestarter firewall, ipmasquering howto,a mandrake
script somebody gave me, i even tried to build a new kernel
,but that was a mistake(reinstall redhat))

fatgod 05-13-2002 03:16 PM

I think you probably know all this but I'm posting it here anyway ;)


OK, lets check some stuff... go to your linux server and connect the ADSL to the internet. Now open a shell and type the following...

ifconfig

Check the inet addr for eth0 and ppp0 and write them down.

now type...

dig

You should get somthing like this...

owen@loki:~ > dig

; <<>> DiG 8.3 <<>>
;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0,

--SNIP--

h27m5s IN A 128.9.0.107

;; Total query time: 53 msec
;; FROM: loki to SERVER: default -- 213.120.62.103
;; WHEN: Mon May 13 20:50:24 2002 **^^^^^^^^^^^^^^**
;; MSG SIZE sent: 17 rcvd: 436


The bit you want is the IP address up there above the **^^^^** bit. Thats your ISPs DNS for you.

then get the DNS hostname by typing...

nslookup <add the DNS IP here>

and you get...

owen@loki:~ > nslookup 213.120.62.103
Server: imsdns07.ims.bt.net
Address: 213.120.62.103

Name: imsdns07.ims.bt.net
Address: 213.120.62.103

write this stuff down and head over to your windows machine with your bit of paper.

Now make sure that the config in the windows networking setup matches everything here...

The DNS hostname is imsdns07 and the domain is ims.bt.net

The gateway is the inet addr from eth0 (192.168.0.1)

also make sure the IP's on both machines are in the same subnet (192.168.0.xxx) but if you can ping then this is OK.


Now, go back to the server and make sure it's still connected to the internet. You need to do the next bit as root so go to the shell and type the next lines...

su
(enter your root password)
ipchains -A forward -i ppp0 -s 192.168.0.2/0 -j MASQ

You should now be able to ping the inet addr of ppp0 that you wrote down earlier. if you can then linux is doing it's masurading for you. you should also be able to ping names such as anduin.net too, if you can then the DNS is working for you too.

If it doesn't, then I would say that there is a firewall problem. Disable _all_ the firewall and masqurading stuff that you have setup (you need to remember it _all_)and try again.

Good luck!

jetfreggel 05-13-2002 04:56 PM

thank you very ,very much
it worked after all those days searching
i don't no how to thank you (could we get private and a .....)
just kidding but you gave the easies way out and it worked
now i can ban windows from my machine (the root of
all evil)
and again thank you very much
:Pengy:

fatgod 05-14-2002 03:33 AM

You are most welcome.

Chijtska 05-23-2002 10:24 PM

[root@redhat philip]# /sbin/ipchains -A forward -i ppp0 -s 192.168.0.2 -j MASQ
ipchains: Protocol not available

i tried this and for some reason it wouldnt work... anyone know why?

JimKyle 05-23-2002 11:30 PM

Quote:

Originally posted by Chijtska
[root@redhat philip]# /sbin/ipchains -A forward -i ppp0 -s 192.168.0.2 -j MASQ
ipchains: Protocol not available

i tried this and for some reason it wouldnt work... anyone know why?

Mandy 8.1 has the 2.4 kernel, and it uses iptables rather than ipchains by default. Check out the man pages and how-tos for iptables; the commands are quite similar but the details do differ!


All times are GMT -5. The time now is 01:00 AM.