routing problems on LAN, please help?

LordMerlin

Well-Known Member
Joined
Apr 8, 2004
Messages
135
Reaction score
0
Location
Johannesburg, South Africa
Hello everyone!

I got the iBurst up and running on Ubuntu 5.10, with the pppoeconf command

So, I setup Linux as a PDC, DHCP, caching DNS server, and want it to route internet traffic for the LAN

My setup is as follows:


iBurst Modem (pppoe connection - get's IP from ISP - 196.2.108.xxx)
|
|
|
eth0 (192.168.0.2)
||
Linux box
||
eth2 (192.168.10.1 - running DHCP)
|
|
|
24 port hub
| | | | |
XP PC 1 XP PC 2 XP PC 3 etc etc

The XP PC's can ping 192.168.10.1 & 192.168.0.1, but not 196.2.108.xxx, nor for example google.com. I tried running
"iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE", but that doesn't seem todo anyting. In fact, I followed the Howto Share internet connection

Can somone please assit me with this?
 
Anyone?

Maybe I should ask it differently. What do I need todo to share internet via my Linux machine, which is connected to a iBurst modem (on the LAN port) ?
 
LordMerlin try the following ......... Set your eth0 is obtain an IP automatically.Just think of eth0 as the WAN interface ,therefore you cant use a Private IP (192.168.0.2).Your current setup would have worked if you added a Broadband Router

PC - 192.168.10.100
|
- 192.168.10.1
Linux Box
- 192.168.0.2
|
- 192.168.0.3
BroadBand Router
- WAN IP
|
iBurst Modem
 
nope :(

ubercal, I already tried that. When I put eth0 in DHCP mode, it doesn't pickup an IP address. If I specify, say 192.168.0.2, it doesn't make any difference.

If this helps, from the client PC, and I can:
ping: 192.168.10.2 - ok
ping: 196.2.106.82 -ok
ping: 196.2.120.1 - no reply

This is what my IP config looks like ATM

eth0 Link encap:Ethernet HWaddr 00:0D:61:64:21:F9
inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0

eth2 Link encap:Ethernet HWaddr 00:50:BF:B7:B4:E4
inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0

ppp0 Link encap:Point-to-Point Protocol
inet addr:196.2.106.82 P-t-P:196.2.120.1 Mask:255.255.255.255

root@mvsrv2:~# route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
196.2.120.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
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
0.0.0.0 196.2.120.1 0.0.0.0 UG 0 0 0 ppp0

root@mvsrv2:~# iptables --list
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination
TCPMSS tcp -- anywhere anywhere tcp flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU

Chain OUTPUT (policy ACCEPT)
target prot opt source destination


I've got a feeling it's todo with iptables rules, though I'm not sure what to look for :(


Unchained, I read through that post, but it doesn't seem to work either. Can you remember if you had todo something funny with yours to work?



[EDIT]

IF it helps at all. I have a Netgear DG834GT ADSL router as well, setup as 192.168.0.1. If I setup eth0 with 192.168.0.2, change my routing table to use 192.168.0.2 as default gw - then it work. But the moment I try and use the iBurst modem, it doesn't?

I am able to surf the net off the ubuntu server....

P.S, this is the iBurst UTD I use
 
Last edited:
Iam not too clued up on Iptables but setup NAT in iptables.Remmember NAT is a routing protocol that routes between a Public and a Private IP.Maybe you have setup IPtables to do a different type of routing (Lan to -Lan routing) instead of using NAT (LAN -to - WAN Routing)
 
ok?

I'm not 100% sure I follow, but it could make sense. What could a tipacle NAT rule look like to forward packets from a public (ppp0) device to a LAN (eth2) device?
 
Maybe a stupid question, did you set the gateway on your Client PC's to the internet Network IP from your ubuntu box?

I followed the instruction on the Internet Connection Sharing Howto and got everything working out of the box.

I have mine set up:

eth0: 192.168.0.1 (internel)
eth1: 192.168.0.255 (external)

I then set my client PC's to use gateway 192.168.0.1.

Sincerely,

Medic
 
Top
Sign up to the MyBroadband newsletter
X