LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2016, 10:21 PM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,745
Blog Entries: 4

Rep: Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963Reputation: 3963
Huh? You can't tell NFS which interfaces to listen to?


I've got an NFS server on a virtual data-center, and I'd simply like to be sure that the server is "listening" on just one of the machine's two (virtual) NICs, but not the other.

... Huh? Can't you do that?

I suppose that I have become accustomed to the idea that this sort of thing was a routine feature of any Linux service.

Last edited by sundialsvcs; 05-26-2016 at 10:23 PM.
 
Old 05-27-2016, 07:39 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You can give specific hosts or network ranges you want to be able to mount your shares in your exports file. That would effectively insure only one interface does the mounts unless you've done some tricky routing or unless you have multiple interfaces using the same VLAN. We do this with our deduplication (NAS) appliances so nothing mounts via the IP we use for management of the appliances but rather uses only a dedicated VLAN for mounting and doing backups.

Alternatively you can use firewalld/iptables to restrict NFS/rpc traffic to specific interfaces.

If you're doing NFS4 I believe you can adjust restrictions in the configuration file for NFS4 vs the exports file.
 
Old 05-30-2016, 05:08 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,182

Rep: Reputation: 450Reputation: 450Reputation: 450Reputation: 450Reputation: 450
check out this link below it will give you an idea:

http://stackoverflow.com/questions/7...rom-ip-address

from link above:
Quote:
This question should be on Server Fault. Nevertheless, the following should do the trick, assuming you're talking about TCP and the IP you want to allow is 1.2.3.4:

iptables -A INPUT -p tcp --dport 8000 -s 1.2.3.4 -j ACCEPT
iptables -A INPUT -p tcp --dport 8000 -j DROP
then you can check using netstat to verify:

netstat -ntlup | grep -i "listen"

Last edited by JJJCR; 05-30-2016 at 05:09 AM. Reason: edit
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RedHat: dhcpd.conf - error: Not configured to listen on any interfaces! alinuxLQ Linux - Networking 8 11-05-2015 06:00 PM
rsyslogd doesnt seem to listen on all interfaces johnnyk Linux - Server 2 12-06-2009 07:57 PM
How to listen on all interfaces at the same time? chinmays Linux - Software 3 01-09-2006 08:14 PM
dhcpd - Not configured to listen on any interfaces. ritter Linux - Networking 1 07-05-2004 03:48 PM
huh huh hey bevis Im guna build a puter! cognosti Linux - Hardware 28 08-12-2003 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration