Accessing net through LAN - Choices [was PCMCIA MODEM]
Now that I have discovered that my PCMCIA modem is a not-quite-yet supported software modem I need to find a temporary solution so that I can connect my laptop to the net. This has forced me to move up the time table on one of my other projects which is to network 2 linux systems and use one to act as a gateway for the other. I have setup an old pc with SuSE 7.0 and networked it with a hub to my laptop. On my desktop I have a modem configured. I would like to set things up now so that my laptop can accecss the internet over the LAN using the modem on the desktop. The services that I want to use on the internet from the laptop are: HTTP FTP POP3 SMTP My dilemma is where to start looking. From skimming the SuSE Manual and various HOW-TO's it seems that I have a choice of options: 1) Set up the desktop as a router for all tcp/ip traffic. 2) Set up a proxy on the desktop. I would like to use whichever method is easiest to setup. Anyone got any comments on the above idea or better suggestions? TIA Jethro
Jethro Cramp wrote:
I have setup an old pc with SuSE 7.0 and networked it with a hub to my laptop.
On my desktop I have a modem configured. I would like to set things up now so that my laptop can accecss the internet over the LAN using the modem on the desktop. The services that I want to use on the internet from the laptop are:
HTTP FTP POP3 SMTP
My dilemma is where to start looking. From skimming the SuSE Manual and various HOW-TO's it seems that I have a choice of options:
1) Set up the desktop as a router for all tcp/ip traffic. 2) Set up a proxy on the desktop.
I would like to use whichever method is easiest to setup. Anyone got any comments on the above idea or better suggestions?
1) would be the easiest to set up. I'll give some instructions here that should work. However, security is entirely non-existent, and you will have to manually dial up on the old PC (unless you have diald set up). If you want a hand with setting up diald or in setting up security on the old PC (which is essential for any consistent usage) then let me know. The starting points would be the IPCHAINS-HOWTO and the man pages for ipchains and diald. Here are some quick and easy steps. On your laptop (as root): route add default gw <ip address of old pc> You'll also have to set up your /etc/resolv.conf with the IP addresses of your ISP's DNS servers (so that it looks the same as the one on the old PC when it's connected). On your old PC (as root): echo 1 > /proc/sys/net/ipv4/ip_forward ipchains -P forward MASQ This does assume you have a basic network set up such that you can ping each computer from the other. If you don't, and need a hand, let us know and someone will help. Remember, this setup is *not* secure. Hope that helps, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\
Chris Reeves wrote:
1) would be the easiest to set up. I'll give some instructions here that should work. However, security is entirely non-existent, and you will have to manually dial up on the old PC (unless you have diald set up). If you want a hand with setting up diald or in setting up security on the old PC (which is essential for any consistent usage) then let me know. The starting points would be the IPCHAINS-HOWTO and the man pages for ipchains and diald.
Here are some quick and easy steps.
On your laptop (as root): route add default gw <ip address of old pc> You'll also have to set up your /etc/resolv.conf with the IP addresses of your ISP's DNS servers (so that it looks the same as the one on the old PC when it's connected).
On your old PC (as root): echo 1 > /proc/sys/net/ipv4/ip_forward ipchains -P forward MASQ
Thanks Chris I will first look more closely at the relevant HOW-TO's and then on Monday I'll have a try.
This does assume you have a basic network set up such that you can ping each computer from the other. If you don't, and need a hand, let us know and someone will help.
Thanks for asking about the network - it is set up and working (installed SuSE on the desktop from the laptop DVD player using NFS).
Remember, this setup is *not* secure.
Noted. If I follow this method can I make it more secure later on (if broadband every arrives in Beijing at a reasonable price). Jethro
Jethro Cramp wrote:
Chris Reeves wrote:
1) would be the easiest to set up. I'll give some instructions here that should work. However, security is entirely non-existent, and you will have to manually dial up on the old PC (unless you have diald set up). If you want a hand with setting up diald or in setting up security on the old PC (which is essential for any consistent usage) then let me know. The starting points would be the IPCHAINS-HOWTO and the man pages for ipchains and diald.
Here are some quick and easy steps.
On your laptop (as root): route add default gw <ip address of old pc> You'll also have to set up your /etc/resolv.conf with the IP addresses of your ISP's DNS servers (so that it looks the same as the one on the old PC when it's connected).
On your old PC (as root): echo 1 > /proc/sys/net/ipv4/ip_forward ipchains -P forward MASQ
This does assume you have a basic network set up such that you can ping each computer from the other. If you don't, and need a hand, let us know and someone will help.
Thanks for asking about the network - it is set up and working (installed SuSE on the desktop from the laptop DVD player using NFS).
Remember, this setup is *not* secure.
Noted. If I follow this method can I make it more secure later on (if broadband every arrives in Beijing at a reasonable price).
You can make it secure at any time. I would advise doing it as soon as possible, even on a modem. The only reason I didn't go into it is because I was giving you the quickest (bare minimum) way. Good luck, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\
Chris Reeves said:
Here are some quick and easy steps.
On your laptop (as root): route add default gw <ip address of old pc> You'll also have to set up your /etc/resolv.conf with the IP addresses of your ISP's DNS servers (so that it looks the same as the one on the old PC when it's connected).
On your old PC (as root): echo 1 > /proc/sys/net/ipv4/ip_forward ipchains -P forward MASQ
Thanks Chris your solution worked 'straight out of the box'. I understand the entries in the /etc/resolv.conf file and why you have to put them there. Can you enlighten me as to what and why the 2 lines that I entered on the PC did? I had a look at the diald documentation and that looks straight forward enough. Might have to come back with some questions on the IPCHAINS. Jethro
Jethro Cramp wrote:
Chris Reeves said:
Here are some quick and easy steps.
On your laptop (as root): route add default gw <ip address of old pc> You'll also have to set up your /etc/resolv.conf with the IP addresses of your ISP's DNS servers (so that it looks the same as the one on the old PC when it's connected).
On your old PC (as root): echo 1 > /proc/sys/net/ipv4/ip_forward ipchains -P forward MASQ
Thanks Chris your solution worked 'straight out of the box'. I understand the entries in the /etc/resolv.conf file and why you have to put them there. Can you enlighten me as to what and why the 2 lines that I entered on the PC did?
The first line enabled packet forwarding on the PC - if you hadn't done this, the PC would have refused to transfer packets of data between its internal network interface and the the modem dialup interface. The second line is a default ipchains rule that says that all packets which are being forwarded must be masqueraded. Masquerading is where multiple computers can use a single IP address - so whether an external computer sends a packet to the PC or the laptop, it will be sending it to the same IP address (since you are only assigned one by your ISP. See the IP-Masquerade HOWTO for more info.
I had a look at the diald documentation and that looks straight forward enough. Might have to come back with some questions on the IPCHAINS.
No problem. Bye, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\
Chris, Thanks for the explanation. Something strange has happened since I setup my PC and laptop as you described: I can't mount nfs partitions. I discovered this when trying to mount the DVD on my laptop to install diald on my PC. It had been working the day before (that's how I installed SuSE on the PC). I don't think I have touched anything else since setting up routing. When I try and mount the nfs partition from the laptop on the pc with mount -t nfs 192.168.0.3:/cdrom /mnt/dvd I get the error 'mount: RPC: Timed out'. Both nfs and portmap services are started on both computers during boot. (By the way I have first mounted the dvd on the cdrom drive on the laptop before trying the nfs mount). Here is some information about my setup: IP Addresses: PC 192.168.0.1 Laptop 192.168.0.3 /etc/exports file from laptop contains only the following line: /cdrom 192.168.0.1(ro) the hosts.allow file on the laptop contains: # See tcpd(8) and hosts_access(5) for a description. #(ALL EXCEPT in.fingerd) EXCEPT in.identd : ALL : (safe_finger -l @%h 2>&1| \ # /bin/mail -s "%d-%h %u" root) & the hosts.deny file on the laptop contains: # See tcpd(8) and hosts_access(5) for a description. http-rman : ALL EXCEPT LOCAL I commented out this line and rebooted the system but to no effect. When I tried to mount the nfs partition RPC still timed out. Do you have any idea what is wrong or where I should be looking in my system? In the SuSE manual on p.162 it says "These scripts are started by /sbin/init.d/rpc and /sbin/init.d/nfsserver at startup." however I don't have the first script on either of my 2 computers. Is this a mistake? Regards, Jethro
Jethro Cramp wrote:
Thanks for the explanation. Something strange has happened since I setup my PC and laptop as you described: I can't mount nfs partitions. I discovered this when trying to mount the DVD on my laptop to install diald on my PC. It had been working the day before (that's how I installed SuSE on the PC). I don't think I have touched anything else since setting up routing.
When I try and mount the nfs partition from the laptop on the pc with mount -t nfs 192.168.0.3:/cdrom /mnt/dvd I get the error 'mount: RPC: Timed out'. Both nfs and portmap services are started on both computers during boot. (By the way I have first mounted the dvd on the cdrom drive on the laptop before trying the nfs mount).
Here is some information about my setup:
IP Addresses:
PC 192.168.0.1 Laptop 192.168.0.3
/etc/exports file from laptop contains only the following line:
/cdrom 192.168.0.1(ro)
the hosts.allow file on the laptop contains:
# See tcpd(8) and hosts_access(5) for a description. #(ALL EXCEPT in.fingerd) EXCEPT in.identd : ALL : (safe_finger -l @%h 2>&1| \ # /bin/mail -s "%d-%h %u" root) &
the hosts.deny file on the laptop contains:
# See tcpd(8) and hosts_access(5) for a description. http-rman : ALL EXCEPT LOCAL
I commented out this line and rebooted the system but to no effect. When I tried to mount the nfs partition RPC still timed out.
Do you have any idea what is wrong or where I should be looking in my system? In the SuSE manual on p.162 it says "These scripts are started by /sbin/init.d/rpc and /sbin/init.d/nfsserver at startup." however I don't have the first script on either of my 2 computers. Is this a mistake?
Sorry for the delay. I think this may (possibly, not having a copy of 7.1 myself) be a mistake. I think the script they mean is /sbin/init.d/portmap. Do an 'rcportmap restart' and see if it works after that. I don't see why it should stop working though, unless you rebooted or something and it didn't strat up properly. But as you say, they are both running, so I can't help you much :( Bye, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\
participants (2)
-
Chris Reeves
-
Jethro Cramp