Re: modem / pon / serial problems
Let me recommend you also look into modconf for configuring modules, and the various update scripts. (I went to /bin, /sbin, /usr/bin, and /usr/sbin and did ls |grep update to find them all. In particular see update-alternatives. You'll be a much happier debianese if you know where these things are and what they do. g Kevin On Sun, 9 Feb 2003 04:34:23 + Pigeon [EMAIL PROTECTED] wrote: On Sat, Feb 08, 2003 at 02:17:51AM -0600, Nathan E Norman wrote: On Sat, Feb 08, 2003 at 12:05:36AM +, Pigeon wrote: On Wed, Feb 05, 2003 at 06:19:36PM -0600, Nathan E Norman wrote: Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. dnsmasq does the trick, is dead easy to get running and would have taken me a lot longer to find without this message. In that case, let me introduce you to the apt-cache command, from the apt package (IOW you almost certainly have it installed). Try this: apt-cache search dns Cool, eh? apt-cache requires no special permissions and can do all sorts of cool things. I find that I use search, show, and showpkg quite frequently. Note that the search term is a real regex, not a glob. I used the results of the above command when I composed my earlier reply; it took me a minute or so to vgrep the output. Cool indeed! I am rather new to the wonders of apt, having only recently upgraded to woody from a slink installation which was so out of date that trying to apt-get anything would have resulted in downloading most of woody via dialup. Now I can use it safely, I understand why everyone raves about it. Thanks, Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Sat, Feb 08, 2003 at 12:05:36AM +, Pigeon wrote: On Wed, Feb 05, 2003 at 06:19:36PM -0600, Nathan E Norman wrote: Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. dnsmasq does the trick, is dead easy to get running and would have taken me a lot longer to find without this message. In that case, let me introduce you to the apt-cache command, from the apt package (IOW you almost certainly have it installed). Try this: apt-cache search dns Cool, eh? apt-cache requires no special permissions and can do all sorts of cool things. I find that I use search, show, and showpkg quite frequently. Note that the search term is a real regex, not a glob. I used the results of the above command when I composed my earlier reply; it took me a minute or so to vgrep the output. -- Nathan Norman - Incanus Networking mailto:[EMAIL PROTECTED] Whenever men attempt to suppress argument and free speech, we may be sure that they know their cause to be a bad one. -- R. G. Horton -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Sat, Feb 08, 2003 at 02:17:51AM -0600, Nathan E Norman wrote: On Sat, Feb 08, 2003 at 12:05:36AM +, Pigeon wrote: On Wed, Feb 05, 2003 at 06:19:36PM -0600, Nathan E Norman wrote: Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. dnsmasq does the trick, is dead easy to get running and would have taken me a lot longer to find without this message. In that case, let me introduce you to the apt-cache command, from the apt package (IOW you almost certainly have it installed). Try this: apt-cache search dns Cool, eh? apt-cache requires no special permissions and can do all sorts of cool things. I find that I use search, show, and showpkg quite frequently. Note that the search term is a real regex, not a glob. I used the results of the above command when I composed my earlier reply; it took me a minute or so to vgrep the output. Cool indeed! I am rather new to the wonders of apt, having only recently upgraded to woody from a slink installation which was so out of date that trying to apt-get anything would have resulted in downloading most of woody via dialup. Now I can use it safely, I understand why everyone raves about it. Thanks, Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Thu, Feb 06, 2003 at 11:42:10AM -0600, Keith G. Murphy wrote: Pigeon wrote: On the modem box I do echo 1 /proc/sys/net/ipv4/ip_forward ipchains -A forward -s 192.168.1.1/32 -d 0.0.0.0/0 -j ACCEPT -b ipchains -P forward ACCEPT pon ukonline ping 195.40.1.36 (this is a ukonline DNS server) ... and it works. I go back to the main box and try and ping the same address, and nothing happens. I'm no expert on ipchains (I've only used iptables), but don't you need to do something for IP Masquerading? In other words, how would the modem box know how to send the response to the ping back to the rear box? Someone please correct me if I'm wrong. I thought that was what the -b (bidirectional) option did. But never mind. I think the document I was reading was a bit out of date. I found a more recent one that spoke in terms of iptables, and that works, so that's what I'm using now. I've appended the script I used for doing this sort of thing using iptables. Note the lines involving 'nat'. It's a shame doing this sort of thing is a bit of a black art (best I can recall I cobbled this together using someone else's script on the 'Net), but you're getting a router for free, so you can't complain too much! :-) Thanks for that. It is much easier to understand something by having a recipe that works, looking up the options used to see what they do, and thus arriving at some picture of what's going on, than by looking at the same man pages with no picture of what goes on, which is a bit like trying to assemble one jigsaw out of a bag containing the bits of several jigsaws, all different but with similar pictures. Thanks, Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Wed, Feb 05, 2003 at 06:19:36PM -0600, Nathan E Norman wrote: Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. dnsmasq does the trick, is dead easy to get running and would have taken me a lot longer to find without this message. Thanks! Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
Pigeon wrote: On the modem box I do echo 1 /proc/sys/net/ipv4/ip_forward ipchains -A forward -s 192.168.1.1/32 -d 0.0.0.0/0 -j ACCEPT -b ipchains -P forward ACCEPT pon ukonline ping 195.40.1.36 (this is a ukonline DNS server) ... and it works. I go back to the main box and try and ping the same address, and nothing happens. I'm no expert on ipchains (I've only used iptables), but don't you need to do something for IP Masquerading? In other words, how would the modem box know how to send the response to the ping back to the rear box? Someone please correct me if I'm wrong. I've appended the script I used for doing this sort of thing using iptables. Note the lines involving 'nat'. It's a shame doing this sort of thing is a bit of a black art (best I can recall I cobbled this together using someone else's script on the 'Net), but you're getting a router for free, so you can't complain too much! :-) #!/bin/sh # # ip-up script for IP Masquerading # Created 10/06/2002 by KGM # # These variables are for the use of the scripts run by run-parts PPP_IFACE=$1 # PPP_TTY=$2 # PPP_SPEED=$3 # PPP_LOCAL=$4 # PPP_REMOTE=$5 # PPP_IPPARAM=$6 # Initialization iptables -F; iptables -t mangle -F echo 1 /proc/sys/net/ipv4/ip_forward iptables -P INPUT ACCEPT iptables -F INPUT iptables -P OUTPUT ACCEPT iptables -F OUTPUT iptables -P FORWARD DROP iptables -F FORWARD iptables -t nat -F # Allow only existing and related connections in iptables -A FORWARD -i $PPP_IFACE -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow all connections out iptables -A FORWARD -i eth0 -o $PPP_IFACE -j ACCEPT iptables -A FORWARD -j LOG # Masquerade! iptables -t nat -A POSTROUTING -o $PPP_IFACE -j MASQUERADE -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Wed, Feb 05, 2003 at 06:19:36PM -0600, Nathan E Norman wrote: On Wed, Feb 05, 2003 at 10:14:36PM +, Pigeon wrote: So I have resorted to a VILE HACK. The main box exports its /etc via NFS to the modem box. A script in the modem box's /etc/ppp/ip-up.d then copies the modem box's newly updated /etc/resolv.conf across to the main box whenever I connect. Grotesque. True. Now you've gone and installed portmap and NFS services on your gateway box which can't be that great of an idea security-wise. On the main box, I have an HD partition with all 7 Woody CDs on it. I installed NFS on the other one so I could install things by apt-getting them from the main box, without having to muck about swapping CDs. Guess I can always purge it when I've finished setting up. I'm sure there must be a less vile method of doing this... what is it? Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. That's plenty of options to experiment with... guess the NFS will stay for a while :-) It's more complicated a solution than I was thinking of, but it'll also no doubt enable me to refer to the local machines by name instead of by number. On Wed, Feb 05, 2003 at 06:06:36PM -0600, John Hasler wrote: Pigeon writes: I'm sure there must be a less vile method of doing this... what is it? a) Run a caching-only nameserver on the modem box. b) Just put the ISP's three nameservers in /etc/resolv.conf and be happy. The only real purpose served by dynamic DNS is to save users the trouble of typing in the numbers. All three servers will work regardless of which two they sent you most recently. Well, (b) will de-vile me until I sort (a) out, which makes life easier. Thanks, to both of you. Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Tue, Feb 04, 2003 at 10:50:43PM +, Pigeon wrote: So: the main box is 192.168.1.1, the modem box is 192.168.1.2. I add gateway 192.168.1.2 to /etc/network/interfaces on the main box and run /etc/init.d/networking restart. On the modem box I do echo 1 /proc/sys/net/ipv4/ip_forward ipchains -A forward -s 192.168.1.1/32 -d 0.0.0.0/0 -j ACCEPT -b ipchains -P forward ACCEPT pon ukonline ping 195.40.1.36 (this is a ukonline DNS server) ... and it works. I go back to the main box and try and ping the same address, and nothing happens. Different approach. Now on the modem box I do: modprobe ipt_MASQUERADE iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE echo 1 /proc/sys/net/ipv4/ip_forward And from the main box, I can get through the modem box and out onto the net. I can ping 195.40.1.36 from the main box and it works. The problem now is DNS. My ISP uses dynamic DNS, so I am used to having ppp rewrite my /etc/resolv.conf every time I connect. Now, of course, the modem box is doing the connecting, so the main box's /etc/resolv.conf does not get updated. The ISP seems to be giving me any two out of three nameservers, so I could fudge it by putting all three in the main box's /etc/resolv.conf, but I'd rather have it updating automatically like it's supposed to. So I have resorted to a VILE HACK. The main box exports its /etc via NFS to the modem box. A script in the modem box's /etc/ppp/ip-up.d then copies the modem box's newly updated /etc/resolv.conf across to the main box whenever I connect. I'm sure there must be a less vile method of doing this... what is it? Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
Pigeon writes: I'm sure there must be a less vile method of doing this... what is it? a) Run a caching-only nameserver on the modem box. b) Just put the ISP's three nameservers in /etc/resolv.conf and be happy. The only real purpose served by dynamic DNS is to save users the trouble of typing in the numbers. All three servers will work regardless of which two they sent you most recently. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Wed, Feb 05, 2003 at 10:14:36PM +, Pigeon wrote: On Tue, Feb 04, 2003 at 10:50:43PM +, Pigeon wrote: So: the main box is 192.168.1.1, the modem box is 192.168.1.2. I add gateway 192.168.1.2 to /etc/network/interfaces on the main box and run /etc/init.d/networking restart. On the modem box I do echo 1 /proc/sys/net/ipv4/ip_forward ipchains -A forward -s 192.168.1.1/32 -d 0.0.0.0/0 -j ACCEPT -b ipchains -P forward ACCEPT pon ukonline ping 195.40.1.36 (this is a ukonline DNS server) ... and it works. I go back to the main box and try and ping the same address, and nothing happens. Different approach. Now on the modem box I do: modprobe ipt_MASQUERADE iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE echo 1 /proc/sys/net/ipv4/ip_forward And from the main box, I can get through the modem box and out onto the net. I can ping 195.40.1.36 from the main box and it works. The problem now is DNS. My ISP uses dynamic DNS, so I am used to having ppp rewrite my /etc/resolv.conf every time I connect. Now, of course, the modem box is doing the connecting, so the main box's /etc/resolv.conf does not get updated. The ISP seems to be giving me any two out of three nameservers, so I could fudge it by putting all three in the main box's /etc/resolv.conf, but I'd rather have it updating automatically like it's supposed to. So I have resorted to a VILE HACK. The main box exports its /etc via NFS to the modem box. A script in the modem box's /etc/ppp/ip-up.d then copies the modem box's newly updated /etc/resolv.conf across to the main box whenever I connect. Grotesque. Now you've gone and installed portmap and NFS services on your gateway box which can't be that great of an idea security-wise. I'm sure there must be a less vile method of doing this... what is it? Install DNS caching software on the gateway (the modem box). Have all internal machines use the gateway as their nameserver (use a static resolv.conf). You can use BIND as a caching only nameserver, and of course there are other choices like dnsmasq, maradns, pdnsd, and DJB's dnscache. -- Nathan Norman - Incanus Networking mailto:[EMAIL PROTECTED] No. Should I include quotations after my reply? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
Pigeon wrote: [cut] in the meantime I still want it to copy data from one serial port to the other so I can continue to dial out as normal from the main box. Of course, Linux can't run my DOS program. But there's a package called snooper which seems to do the same thing. So I installed it on the modem box and set it up to connect the external and modem serial ports. Try pon from the main box - nothing. [cut] Since you seem dead-set against buying a couple of NICs... I would take a completely different tack and try using SLIP, so you'll have regular TCP/IP networking going on over the serial line. Then use the modem PC as your gateway, and run PPP in demand mode on the modem PC. One of the many beauties of this approach is that when you *do* buy a couple of NICs, and even when you replace your dialup with broadband, you'll still can use the same PC as a gateway. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Mon, Feb 03, 2003 at 10:16:48PM +, Pigeon wrote: get this working, and in the meantime I still want it to copy data from one serial port to the other so I can continue to dial out as normal from the main box. There's an NFS option in the kernel config that allows to directly export devices via NFS. Maybe it's easier to export your /dev/modem from one box to the other by NFS as to use sort-of-program and a special cable. I've never tried to directly export devices, though, but maybe it helps. GH -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
With this arrangement, pppconfig can't autodetect the modem... Pppconfig uses pppd to autodetect, but why do you care? You know what port to use. Just select it manually in pppconfig. But it'll take me a while to get this working... Why? Just set up demand-dialing on it with pppconfig, make it the gateway for your other box, and you'll be off and running. cat /dev/ttyS1 | tee /dev/ttyS2 ; cat /dev/ttyS2 | tee /dev/ttyS1 Same result. pppconfig sends AT, receives OK, sends loads of garbage ending with Loopback detected, and selects the correct port. pon, however, sends nothing at all. Pppd expects a real serial port. It could take a long time to get this working. You're doing it the hard way. See above. -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: modem / pon / serial problems
On Tue, Feb 04, 2003 at 10:44:37AM -0600, John Hasler wrote: Ah, a reply from the master, thank you! With this arrangement, pppconfig can't autodetect the modem... Pppconfig uses pppd to autodetect, but why do you care? You know what port to use. Just select it manually in pppconfig. I don't care, but I thought it would be a useful piece of diagnostic information. But it'll take me a while to get this working... Why? Ignorance, lack of dead-tree documentation and personal incompatibility with the online variety. Just set up demand-dialing on it with pppconfig Not into demand dialing. I'd rather ssh into it and pon / poff by hand. That way I can minimise the connect time, even if it is less convenient. So I've set it up that way, and it works. make it the gateway for your other box, and you'll be off and running. Now this is the tricky bit. Never had to set up a network before, and don't know much about it. Connecting the two machines was easy - the woody installer more or less did it all for me. So: the main box is 192.168.1.1, the modem box is 192.168.1.2. I add gateway 192.168.1.2 to /etc/network/interfaces on the main box and run /etc/init.d/networking restart. On the modem box I do echo 1 /proc/sys/net/ipv4/ip_forward ipchains -A forward -s 192.168.1.1/32 -d 0.0.0.0/0 -j ACCEPT -b ipchains -P forward ACCEPT pon ukonline ping 195.40.1.36 (this is a ukonline DNS server) ... and it works. I go back to the main box and try and ping the same address, and nothing happens. Obviously I'm missing something, but I'm not sure what. Any pointers, please? There's got to be a dead simple recipe to just make it work! Once it is working, I can play about, experiment with it and figure out what's going on. Currently it isn't working, which makes experimentation hard. cat /dev/ttyS1 | tee /dev/ttyS2 ; cat /dev/ttyS2 | tee /dev/ttyS1 Same result. pppconfig sends AT, receives OK, sends loads of garbage ending with Loopback detected, and selects the correct port. pon, however, sends nothing at all. Pppd expects a real serial port. It could take a long time to get this working. You're doing it the hard way. See above. Yeah, but with a DOS program (that ignores the hardware flow control lines) doing the job of the above shell command, while pppconfig doesn't work, pon and subsequent use of the modem work fine. So, for me, given that I know sod all about networking, but can get the fudge working in DOS, it seems easier to make the fudge work in Linux as well, so I can run Linux on both boxes but still get online while I still don't know how to set up forwarding. So, thanks for your input so far; I'm trying to follow your recommended method; can you supply the missing piece in my jigsaw please? Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
modem / pon / serial problems
Hi, My motherboard has no ISA slots, but my (hardware) modem is an ISA device. So, to make it usable, I have a second machine which does have ISA slots. This is connected to the main machine by a 3-wire crossover serial cable, and runs a DOS program to copy the external serial port to the modem's serial port, and vice versa. With this arrangement, pppconfig can't autodetect the modem, but if I enter the serial port by hand and add nocrtscts to /etc/ppp/peers/provider, the dialup works. The modem box is a 600MHz Celeron, and I think it could be better used than simply running a tiny little DOS program. So I networked it to the main box and installed woody on it. That worked fine; I can ssh into it and muck about, mount NFS exports from the main box, etc. Ultimately it's gonna be a print server and a firewall for the main box, and will talk to the modem itself. But it'll take me a while to get this working, and in the meantime I still want it to copy data from one serial port to the other so I can continue to dial out as normal from the main box. Of course, Linux can't run my DOS program. But there's a package called snooper which seems to do the same thing. So I installed it on the modem box and set it up to connect the external and modem serial ports. Try pon from the main box - nothing. 0 characters sent or received. I replaced the 3-wire serial cable with a proper null modem, RX/TX crossed, RTS/CTS crossed, DTR/DSR crossed, CD and GND straight through. Now pppconfig autodetects the modem OK. snooper shows AT being sent and echoed, OK being returned, then loads of garbage ending with Loopback detected, and pppconfig correctly selects the serial port. And of course I don't need nocrtscts in /etc/ppp/peers/provider. But I still can't dial out. I try pon and I still get 0 characters sent or received. I tried it without snooper: cat /dev/ttyS1 | tee /dev/ttyS2 ; cat /dev/ttyS2 | tee /dev/ttyS1 Same result. pppconfig sends AT, receives OK, sends loads of garbage ending with Loopback detected, and selects the correct port. pon, however, sends nothing at all. To recap: Main box connected by serial cable to modem box. Main box trying to run pon (and pppconfig); modem box runs prog to copy one serial port to the other. With 3-wire serial cable/nocrtscts and DOS prog: pppconfig doesn't work, pon does. With 3-wire serial cable and Linux progs (snooper or cat): nothing works. With 8-wire serial cable and DOS prog: irrelevant, DOS prog doesn't handle hardware flow control. With 8-wire serial cable and Linux progs: pppconfig works, pon doesn't. Any ideas why pon refuses to send anything, and how to kick its arse? Pigeon -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]