FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-05-2009, 06:36 AM
Zanga Chimombo
 
Default Modem and NIC Gateway

i've searched for this topic both online and in the archives but the
results all seem to have some slight but crucial difference with my
configuration. e.g. use of firewall


i'm setting up a gateway for use in one of our remote offices. it will
use a GPRS modem to connect to the outside world and eth0 on the
internal LAN.


i am connecting to the internet fine using both ppp0 and eth0 interfaces
_separately_! but setting up the box as a gateway is proving difficult.
i have set up gateways before but using two NICs, not a NIC and a modem.
i didn't have to tamper with iptables until later in the configuration.
i am assuming it is going to be the same in this set up. i want to set
up routing first.


my ISP is using DHCP and ppp0 gets assigned 172.21.5.136, say and uses
gateway 172.21.0.1.


i am able to ping 172.21.5.136 but not 172.21.0.1. what do route do i
need to add?


--

Regards,

Zanga Chimombo
IT Manager
ADMARC
PO Box 5052
Limbe
Malawi

Tel: 01 840 044/500
Fax: 01 840 486


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 06:53 AM
Ron Johnson
 
Default Modem and NIC Gateway

On 02/05/2009 01:36 AM, Zanga Chimombo wrote:
i've searched for this topic both online and in the archives but the
results all seem to have some slight but crucial difference with my
configuration. e.g. use of firewall


i'm setting up a gateway for use in one of our remote offices. it will
use a GPRS modem to connect to the outside world and eth0 on the
internal LAN.


i am connecting to the internet fine using both ppp0 and eth0 interfaces
_separately_! but setting up the box as a gateway is proving difficult.
i have set up gateways before but using two NICs, not a NIC and a modem.
i didn't have to tamper with iptables until later in the configuration.
i am assuming it is going to be the same in this set up. i want to set
up routing first.


my ISP is using DHCP and ppp0 gets assigned 172.21.5.136, say and uses
gateway 172.21.0.1.


i am able to ping 172.21.5.136 but not 172.21.0.1. what do route do i
need to add?


What does your current route table look like? Also, what does your
/etc/network/interfaces look like? (Strip out blanks and comments
to minimize the noise, please.)


--
Ron Johnson, Jr.
Jefferson LA USA

Supporting World Peace Through Nuclear Pacification


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 07:15 AM
Zanga Chimombo
 
Default Modem and NIC Gateway

What does your current route table look like?

This is what the output of "netstat -rn" looks like upon startup.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0


This is what it looks like after running "wvdial".
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
ppp0


Also, what does your
/etc/network/interfaces look like?

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static

address 192.168.0.61
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 11:38 AM
Ron Johnson
 
Default Modem and NIC Gateway

On 02/05/2009 02:15 AM, Zanga Chimombo wrote:

What does your current route table look like?

This is what the output of "netstat -rn" looks like upon startup.
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0


This is what it looks like after running "wvdial".
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
ppp0


Your problem is that you aren't defining a gateway address.




Also, what does your /etc/network/interfaces look like?

auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static

address 192.168.0.61
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255


--
Ron Johnson, Jr.
Jefferson LA USA

Supporting World Peace Through Nuclear Pacification


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 12:07 PM
Zanga Chimombo
 
Default Modem and NIC Gateway

Your problem is that you aren't defining a gateway address.
i've tried "route add default gw 172.21.0.1 ppp0", after which the
routing table looks thus.


Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 172.21.0.1 0.0.0.0 UG 0 0 0
ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
ppp0


but i still can't ping 172.21.0.1 from a client.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 12:23 PM
Ron Johnson
 
Default Modem and NIC Gateway

On 02/05/2009 07:07 AM, Zanga Chimombo wrote:

Your problem is that you aren't defining a gateway address.
i've tried "route add default gw 172.21.0.1 ppp0", after which the
routing table looks thus.


Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface

172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 172.21.0.1 0.0.0.0 UG 0 0 0 ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0

but i still can't ping 172.21.0.1 from a client.


Because you added a new line to the routing table. It needs to
modify the Iface 172.21.0.1. Preferably when you actually create
the link in wvdial.


--
Ron Johnson, Jr.
Jefferson LA USA

Supporting World Peace Through Nuclear Pacification


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 12:37 PM
Zanga Chimombo
 
Default Modem and NIC Gateway

Ron Johnson wrote:
It needs to modify the Iface 172.21.0.1.

i'm not sure how. any pointers would be greatly appreciated.


Preferably when you actually create the link in wvdial.
my ISP uses DHCP so the local IP, gateway and DNSs are being assigned
automatically. i did the minimum of configuration for the modem (Phone,
Username and Password) but i'm utterly clueless as to how wvdial
modifies the routing table...



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 12:51 PM
Aneurin Price
 
Default Modem and NIC Gateway

On Thu, Feb 5, 2009 at 1:37 PM, Zanga Chimombo <z.chimombo@admarc.co.mw> wrote:
> Ron Johnson wrote:
>>
>> It needs to modify the Iface 172.21.0.1.
>
> i'm not sure how. any pointers would be greatly appreciated.
>
>> Preferably when you actually create the link in wvdial.
>
> my ISP uses DHCP so the local IP, gateway and DNSs are being assigned
> automatically. i did the minimum of configuration for the modem (Phone,
> Username and Password) but i'm utterly clueless as to how wvdial modifies
> the routing table...
>

You shouldn't need to set a gateway in order to ping 172.21.0.1 because
you should have a direct connection to it. Your initial routing table
looks like it should work so I'd suspect another problem. That said, the
final line isn't right if you want to contact the outside world.
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
should be:
0.0.0.0 172.21.0.1 0.0.0.0 U 0 0 0 ppp0

I believe the command to set that up would be
'route add default gw 172.21.0.1 dev ppp0'.

You said you can connect fine using ppp alone - what does the routing
table look like then?

Nye


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 01:02 PM
Zanga Chimombo
 
Default Modem and NIC Gateway

Aneurin Price wrote:

You shouldn't need to set a gateway in order to ping 172.21.0.1 because
you should have a direct connection to it. Your initial routing table
looks like it should work so I'd suspect another problem. That said, the
final line isn't right if you want to contact the outside world.
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
should be:
0.0.0.0 172.21.0.1 0.0.0.0 U 0 0 0 ppp0

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 172.21.0.1 0.0.0.0 UG 0 0 0
ppp0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
ppp0


yeah, the final line looks dubious to me too, but i wasn't sure.
however, if i make the changes u r suggesting surely the 3rd and 4th
lines will only differ on the "G" flag? that doesn't look right either!?



You said you can connect fine using ppp alone - what does the routing
table look like then?
i can connect fine to the internet from the gateway. This is what it
looks like.

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
ppp0



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-05-2009, 01:24 PM
Aneurin Price
 
Default Modem and NIC Gateway

On Thu, Feb 5, 2009 at 2:02 PM, Zanga Chimombo <z.chimombo@admarc.co.mw> wrote:
> Aneurin Price wrote:
>>
>> You shouldn't need to set a gateway in order to ping 172.21.0.1 because
>> you should have a direct connection to it. Your initial routing table
>> looks like it should work so I'd suspect another problem. That said, the
>> final line isn't right if you want to contact the outside world.
>> 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
>> ppp0
>> should be:
>> 0.0.0.0 172.21.0.1 0.0.0.0 U 0 0 0
>> ppp0
>
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
> ppp0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 0.0.0.0 172.21.0.1 0.0.0.0 UG 0 0 0
> ppp0
> 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
> ppp0
>
> yeah, the final line looks dubious to me too, but i wasn't sure. however, if
> i make the changes u r suggesting surely the 3rd and 4th lines will only
> differ on the "G" flag? that doesn't look right either!?
>

My apologies, that should indeed have the 'G' flag, so the modified version
is correct aside from the addition of the extra line with no gateway set.

>> You said you can connect fine using ppp alone - what does the routing
>> table look like then?
>
> i can connect fine to the internet from the gateway. This is what it looks
> like.
> Kernel IP routing table
> Destination Gateway Genmask Flags MSS Window irtt
> Iface
> 172.21.0.1 0.0.0.0 255.255.255.255 UH 0 0 0
> ppp0
> 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0
> eth0
> 0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0
> ppp0
>

You said 'i am able to ping 172.21.5.136 but not 172.21.0.1' and 'i can
connect fine to the internet from the gateway'.
So you can ping, say google.com from your gateway machine correctly? But
you can't ping 172.21.0.1 from your gateway? If that's the case, then maybe
172.21.0.1 is simply set not to respond to ping requests.

Since you can get to the internet from your gateway, then its routing should
be fine, and the next thing is to configure IP masqurading to allow your
internal network to connect via that machine.

Nye


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org