PDA

View Full Version : share internet for incoming modem connection


chronox
25th September 2004, 12:33 PM
i have successfully networked my computers under a router acting as a gateway for the internet. now I have a linux fedora core 2 server which accepts incoming modem connections. It connects and I was able to ping the server but sadly i cant provide internet connection to the incoming modem client.

Server local ip: 192.168.7.7
router ip: 192.168.7.1
gateway (dsl via router): 192.168.7.1
client modem ip: 192.168.7.10

http://www.swcp.com/~jgentry/pers.html <--- followed this guide.

i just want to forward all activity of the client to the router.

how my network looks like:
incoming modem >> linux server >> router >> dsl modem >> internet

devices used:

ttyS0, eth0

firewall is off

blammo
25th September 2004, 02:35 PM
Check into iptables. If the client connects and gets an IP on your network, it's just a matter of forwarding and NAT for it to find the gateway.

chronox
26th September 2004, 05:10 PM

my client gets the ip 192.168.7.10 aqnd is able to ping the server but it doesnt have any access to the internet.

how do i do the forwarding and NAT?

but i believe i've done the forwarding part... but im not sure with the NAT part...

chronox
27th September 2004, 05:29 PM
this is the output of my "route"

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.7.10 * 255.255.255.255 UH 0 0 0 ppp0
192.168.7.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
default 192.168.7.1 0.0.0.0 UG 0 0 0 eth0


with that i am able to contact the router itself and ping ALL lan networks...

ppp0 = the client dialing up on the server