Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Two laptops and a dialup connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Wed Jun 16, 2004 3:13 pm    Post subject: Two laptops and a dialup connection Reply with quote

OK, I'm advancing, but I feel like a slug. :?

I have two laptops at home, mine and my wife's. I plan to make them both fully operational under Gentoo :D .

First and foremost problem:

:arrow: I can't share the internet dialup connection;

Second problem:

:arrow: We need to share directories, but I still haven't figured out how to make nfs work.

Both run 2.6 kernels (mine 2.6.5-gentoo, hers still 2.6.3-gentoo); I've emerged rpc2 for hers; we can ping each other; I've tried to emerge firestarter, but iptables didn't compiled properly; I've made mountpoints and fstab entries (type:nfs; opts:noauto); when I try to mount, I get:
Code:
mount: RPC: Program not registered

There's loads of stuff to learn and config, and I don't fear it. But sometimes a quick advice from someone who knows sets me in the right direction much faster (and enjoyably) than spending the night trying things at random and half-understanding helps and howtos. :wink:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
silicondecay
n00b
n00b


Joined: 21 Mar 2004
Posts: 52

PostPosted: Wed Jun 16, 2004 3:29 pm    Post subject: Reply with quote

I have setup nfs before, but don't have the answers at the moment.

As far as dialup goes, there is plenty of documentation.

Basically you dial in with one computer, set it up as a gateway, setup iptables for DNAT and SNAT, and on your other computer set the gateway to your first computer.

I can only start you off in the right direction as its been awhile:

echo 1 > /proc/sys/net/ipv4/ip_forward

#will allow your computer to act as a gateway/forward packets

Setup iptables with NAT

#there are many scripts available online for this, as its not exactly easy

#on your wife's computer set the gateway to the address of yours
route add default gw 192.168.1.1


I have an older Red Hat Linux Bible, which is invaluable to refer to in cases like this. They only cost about $40.
_________________
I wanted to be a pimp when I grew up. Turns out I became a computer nerd. Go figure.
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Wed Jun 16, 2004 10:38 pm    Post subject: Reply with quote

n00b question: :oops: What's DNAT and SNAT? Is it sufficient to emerge iptables?
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Thu Jun 17, 2004 2:58 am    Post subject: Reply with quote

For nfs
Code:
>emerge nfs-utils
then
Code:
>/etc/init.d/nfs start


:) :)
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 12:31 pm    Post subject: Reply with quote

Code:
root@thinkpad daniel # /etc/init.d/nfs start
 * Starting portmap...                                                    [ ok ] * Starting NFS statd...                                                  [ ok ] * Exporting NFS directories...
exportfs: No options for /data hp: suggest hp(sync) to avoid warning
exportfs: /etc/exports [2]: No 'sync' or 'async' option specified for export "hp:/data".
  Assuming default behaviour ('sync').
  NOTE: this default has changed from previous versions                   [ ok ] * Starting NFS daemon...
 * Error starting NFS daemon                                              [ !! ]
 * Starting NFS mountd...
Cannot register service: RPC: Unable to send; errno = Invalid argument
 * Error starting NFS mountd                                              [ !! ]


:cry:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Thu Jun 17, 2004 1:33 pm    Post subject: Reply with quote

NFS needs the portmap service running. If you don't have that up, that might be causing the error. For the connection sharing, check out the Shorewall firewall. You can specify what interfaces to protect, and what to allow to masquerade. It's homepage is at www.shorewall.net. If you go that route, I would add this to /etc/portage/package.keywords
Code:
 net-firewall/shorewall ~x86
This will use the most recent version of Shorewall (even though it's marked as unstable right now, it should be fine for you).
_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Thu Jun 17, 2004 1:34 pm    Post subject: Reply with quote

Post your /etc/exports file

:) :)
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 1:42 pm    Post subject: Reply with quote

Code:
# /etc/exports: NFS file systems being exported.  See exports(5).
/data hp

_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 1:46 pm    Post subject: Reply with quote

Quote:
/etc/portage/package.keywords

David, are you sure there is an /etc/portage directory? :roll:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Thu Jun 17, 2004 2:26 pm    Post subject: Reply with quote

Your exports file looks ok. I think I would add
Code:
(rw,sync)
after hp. Can you ping back an forth between machines? Did you check your log files after you tried to start nfs for more clues to what might have went wrong?

:) :)
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 2:57 pm    Post subject: Reply with quote

Yes, I've been pinging for months... Where should I look for the log file? :oops:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Thu Jun 17, 2004 3:08 pm    Post subject: Reply with quote

Look in /var/log. To get the end of the log file do
Code:
>tail somelogfile.log
and it will print the last 25 or so lines.

:) :)
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 3:32 pm    Post subject: Reply with quote

Code:
root@thinkpad log # tail messages
Jun 18 01:24:54 thinkpad RPC: sendmsg returned error 101
Jun 18 01:24:54 thinkpad portmap: RPC call returned error 101
Jun 18 01:24:54 thinkpad RPC: failed to contact portmap (errno -101).
Jun 18 01:24:54 thinkpad RPC: sendmsg returned error 101
Jun 18 01:24:54 thinkpad portmap: RPC call returned error 101
Jun 18 01:24:54 thinkpad RPC: failed to contact portmap (errno -101).
Jun 18 01:24:54 thinkpad nfsd[6968]: nfssvc: Network is unreachable
Jun 18 01:24:54 thinkpad rc-scripts: Error starting NFS daemon
Jun 18 01:24:54 thinkpad rpc.mountd: unable to register (mountd, 1, udp).
Jun 18 01:24:54 thinkpad rc-scripts: Error starting NFS mountd
:wink:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Thu Jun 17, 2004 3:56 pm    Post subject: Reply with quote

dmvianna wrote:
Quote:
/etc/portage/package.keywords

David, are you sure there is an /etc/portage directory? :roll:


If you've never done any portage things like this, it might not exist. You'll have to create the dir and the package.keywords file. From your log, it sounds like you do not have portmap running. It must be running on both the nfs server and nfs client. If it is running, is there a firewall on either machine? I'm not sure if portmap is part of the nfs package or not. You might need to do a
Code:
#/etc/init.d/portmap start and
#rc-update add portmap default
on both machines.

<EDIT:>Just remembered you were going to do a firewall. If you decide to go with Shorewall, remember to either allow connections between local machines either on a per service basis in
Code:
/etc/shorewall/rules
or on an entire interface basis in
Code:
/etc/shorewall/policy
I usually allow all connections from the internal interface to the firewall and vice versa in the policy file. Less maintenance...
_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"


Last edited by davidblewett on Thu Jun 17, 2004 4:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Thu Jun 17, 2004 3:58 pm    Post subject: Reply with quote

That 'network is unrechable' error is strange. Fix that and it will probably work. Here is a url for more trouble shooting tips http://www.higs.net/85256C89006A03D2/web/PageLinuxNFSTroubleshooting

You do have the nfs stuff complied into the kernel, right?
:) :)
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 10:19 pm    Post subject: Reply with quote

Code:
#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_TCP is not set
CONFIG_LOCKD=y
CONFIG_EXPORTFS=y
CONFIG_SUNRPC=y
# CONFIG_RPCSEC_GSS_KRB5 is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_INTERMEZZO_FS is not set
# CONFIG_AFS_FS is not set

Maybe this is interesting stuff too. I can use modem and ping the other computer, but to be true I've set this without knowing what I was doing
Code:
#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK_DEV=y
CONFIG_UNIX=y
CONFIG_NET_KEY=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
CONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_TOS is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=m
# CONFIG_NET_IPGRE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_IPCOMP=y

#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_IRC=y
CONFIG_IP_NF_TFTP=y
CONFIG_IP_NF_AMANDA=y
CONFIG_IP_NF_QUEUE=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_IPRANGE=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_PKTTYPE=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_RECENT=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_DSCP=y
CONFIG_IP_NF_MATCH_AH_ESP=y
CONFIG_IP_NF_MATCH_LENGTH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_TCPMSS=y
CONFIG_IP_NF_MATCH_HELPER=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_MATCH_CONNTRACK=y
CONFIG_IP_NF_MATCH_OWNER=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_SAME=y
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_NAT_IRC=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_NAT_TFTP=y
CONFIG_IP_NF_NAT_AMANDA=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_DSCP=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_CLASSIFY=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_TCPMSS=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=y
:wink:
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 10:56 pm    Post subject: Reply with quote

My wife's log file:
Code:
DR log # tail messages
Jun 17 05:35:01 SDR CRON[29825]: (root) CMD (root^Itest -x /usr/sbin/run-crons && /usr/sbin/run-crons )
Jun 17 05:35:01 SDR sSMTP[29827]: Unable to locate mail
Jun 17 05:35:01 SDR sSMTP[29827]: Cannot open mail:25
Jun 17 05:35:01 SDR CRON[29824]: (root) MAIL (mailed 43 bytes of output but got status 0xffffffff )
Jun 17 05:35:35 SDR su(pam_unix)[29840]: session opened for user root by daniel(uid=1000)
Jun 17 05:35:37 SDR portmap: server localhost not responding, timed out
Jun 17 05:35:37 SDR nfsd[29758]: nfssvc: Input/output error
Jun 17 05:35:37 SDR rc-scripts: Error starting NFS daemon
Jun 17 05:35:37 SDR rpc.mountd: unable to register (mountd, 1, udp).
Jun 17 05:35:37 SDR rc-scripts: Error starting NFS mountd

_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Jun 17, 2004 11:14 pm    Post subject: Reply with quote

David:
Code:
root@SDR daniel #  /etc/init.d/portmap start
 *WARNING: "portmap" has already been started.

_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
davidblewett
Apprentice
Apprentice


Joined: 15 Feb 2004
Posts: 274
Location: Indiana

PostPosted: Fri Jun 18, 2004 12:45 pm    Post subject: Reply with quote

dmvianna wrote:
Code:
#
# Network File Systems
#
CONFIG_NFS_FS=y
# CONFIG_NFS_V3 is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y

It looks like you don't have NFS support in the kernel. You would need to change the CONFIG_NFS_V3 and possibly CONFIG_NFS_DIRECTIO as either a module or compiled in. If you choose a module, you can use modprobe to test it without having to reboot. I'm not sure what the module is called, it should say in the help section for that option. I believe it is under File Systems -> Network File Systems.

Hmm, the portmap might have been started but died unexpectedly. After you fix the kernel problem, try
Code:
#/etc/init.d/portmap stop
#/etc/init.d/portmap zap
#/etc/init.d/portmap start

_________________
No guilt in life, no fear in death
this is the power of Christ in me
From life’s first cry to final breath
Jesus commands my destiny
-- Newsboys, "In Christ Alone", "Adoration: The Worship Album"
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Thu Sep 02, 2004 4:16 pm    Post subject: Reply with quote

slurp56: Thanks for your help. Unfortunately, the troubleshooting expects the problem to be in the kernel config.

David: Changed the kernel config, included stuff as builtin or module, etc., reemerged nfs-utils...

My wife's comp now has Fedora 2. So her nfsd works, and I can mount her directories. But she can't mount mine. And of course, both servers ping each other. It's clear now that the only thing in my way is Gentoo's nfsd setup.

...help?
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Fri Sep 03, 2004 8:47 am    Post subject: Reply with quote

:oops: :oops: :oops: :oops:

net.lo was stopped all the time. I never understood what was its use, as I can dhcpcd without it, but just with net.eth0... As soon as I got it running, it did the trick.

Now to the next step...
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
dmvianna
l33t
l33t


Joined: 22 Mar 2004
Posts: 742
Location: Down Underland

PostPosted: Sun Sep 05, 2004 10:41 am    Post subject: Reply with quote

:oops: :oops: :oops:

I had a firewall running in my machine... And was surprised that ping worked for the four first packets then started to fail after that each time exactly in the same way...

NFS is working two-way now :lol: (it's easy, but the files are so scattered that it is way prone to mistakes. Maybe one day we could have a unified config file?).

This is the seventh day and I haven't rested yet. Sharing the internet connection will have to wait.

Hey, Slurp53, your troubleshooting webpage was invaluable. Thanks heaps!

:D
_________________
Proprietary is theft. Pierre-Joseph Proudhon, if he had a chance
Powered by a MacBook Pro
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum