Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 26th, 2002, 07:37 PM
zwwwxy zwwwxy is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 29 zwwwxy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cool i have connect adsl sucess but fail in forward ip as in lan

i want to build one gateway with adsl-linux for my lan-gateway.

i have connect adsl in my rh sucess and browse with lynx ok. but once i want to set it as what i have done in my lan-work for a gateway between to interface, i fail.

i have two net adapter eth0 for adsl and eth1 for lan-gateway.
i config eth1 192.168.0.254,
then set ip_forward=yes.

restart network, then adsl-start, then ppp0 appear in ifconfig list.

normally the route will work and i can access the computers what locate in the other subnet via this gateway, but this time, it did not work.

i wonder, it may cause by none masq or nat. so i type in:
ipchaise -A forward -i ppp0 -j masq
alas, it echo that: protocal not available.

i do not know what my fault or what should i do.

could somebody give me some tips?

thanks ahead.
frederick

Reply With Quote
  #2  
Old June 27th, 2002, 01:38 AM
linuxgeekwannab linuxgeekwannab is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 1 linuxgeekwannab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok, its 2 something and im all out of mountain dew. I have read through every single linux book i have, and tried the man pages, and i have kind of the same problem. I have tried so many combinations of
route add blah blah blah im so confused =(
i have a netork on eth0, sharing an internet connection on my dialup modem ppp0.
here is my routing table when the modem is not connected:
destination gateway etc etc etc Iface
192.168.0.0 * eth0

when the modem is connected it is:
destination gateway etc etc Iface
209.247.23.46 0.0.0.0 ppp0
192.168.0.0 0.0.0.0 eth0
0.0.0.0 209.247.23.46 ppp0


what route command would allow a computer on the 192.168.0.0 network to have access to the dialup connection?



p.s. i dont know if its of an importance but the display from ifconfig ppp0 is
inet addr:63.214.125.83 P-t-P:209.247.23.46

thanks so much

Reply With Quote
  #3  
Old June 27th, 2002, 03:56 AM
justice41 justice41 is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: The Emerald City
Posts: 289 justice41 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
the route command that you need to run on the computers on the lan that want to connect through the gateway is
Code:
route add default gw 192.168.0.1 eth0

where 192.168.0.1 should be replaced with the (private) internal address of the gateway machine. If the other computers on the lan have more than one ethernet card then you will have to check/change the eth0 to correspond to the device they use to connect to the gateway.

jaa

Reply With Quote
  #4  
Old June 27th, 2002, 12:01 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
"protocol not available" is a little misleading: the masquerading module is not loaded

modprobe ip_masquerade

to the other problem (route):
pppd starts the script /etc/ppp/ip-up upon connecting and passes the new IP as parameter. this is where you should setup routing and firewalling. if you don´t, your route might be dropped when the IP changes.
make sure you have "nodefaultroute" in /etc/ppp/options.ppp0

[edit]
oops, sorry, didn´t read thoroughly enough. the clients of course need the gateway´s IP as default gateway.
[/edit]

[another edit]
"masq" has to be capital letters - this could be the problem too
[/another edit]
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Last edited by M.Hirsch : June 27th, 2002 at 12:07 PM.

Reply With Quote
  #5  
Old June 28th, 2002, 06:28 AM
zwwwxy zwwwxy is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 29 zwwwxy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks, i tried it again

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > i have connect adsl sucess but fail in forward ip as in lan


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway