Source port on AIX for NAS is same?


 
Thread Tools Search this Thread
Operating Systems AIX Source port on AIX for NAS is same?
# 8  
Old 05-30-2018
Quote:
Originally Posted by MadeInGermany
According to this link you can add a line to /etc/environment
Code:
NFS_PORT_RANGE=udp[4000-5000]:tcp[7000-8000]

that will be inherited in a new login shell.
(I am not sure how/if this will spread to a "NFS mount at boot".)
In AIX (many) daemons are started with a sort-of "super-daemon" called SRC (system resource controller). It is possible to change the way a process controlled by it is started (or run) by using the command chssys. It is also possible to start daemons via the /etc/inittab directly as AIX has a SystemV-style boot sequence. It also sports RC-scripts, which can also be configured. (Some ssh-versions are an example of a service started by such an RC-script, although newer ssh-packages usually start it via inittab.) The group of daemons used for NFS depend on the NFS version(s) the system is using: biod, lockd, portmapper and statd are used for NFSv3, nfsrygd for NFSv4.

Quote:
Originally Posted by MadeInGermany
I do not understand why you bother with the source ports; it does not matter at all, and usually a firewall does not have rules about source ports.
Amen to that. Furthermore, in post #3 the question was definitely about NAS and not NFS.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 9  
Old 06-07-2018
Quote:
Originally Posted by MadeInGermany
Code:
NFS_PORT_RANGE=udp[4000-5000]:tcp[7000-8000]

that will be inherited in a new login shell.
(I am not sure how/if this will spread to a "NFS mount at boot".)
I do not understand why you bother with the source ports; it does not matter at all, and usually a firewall does not have rules about source ports.
I will get back to you , after trying this.
# 10  
Old 06-20-2018
Quote:
Originally Posted by anil1000
I will get back to you , after trying this.
This does not work, don't know what we are missing here.

KIndly advise.

---------- Post updated at 11:47 AM ---------- Previous update was at 11:17 AM ----------

Quote:
Originally Posted by bakunin
In AIX (many) daemons are started with a sort-of "super-daemon" called SRC (system resource controller). It is possible to change the way a process controlled by it is started (or run) by using the command chssys. It is also possible to start daemons via the /etc/inittab directly as AIX has a SystemV-style boot sequence. It also sports RC-scripts, which can also be configured. (Some ssh-versions are an example of a service started by such an RC-script, although newer ssh-packages usually start it via inittab.) The group of daemons used for NFS depend on the NFS version(s) the system is using: biod, lockd, portmapper and statd are used for NFSv3, nfsrygd for NFSv4.



Amen to that. Furthermore, in post #3 the question was definitely about NAS and not NFS.

I hope this helps.

bakunin
BELOW IS THE DETAIL EXPLANATION OF THE ISSUE:-

Let me explain you the scenario

-There are 100 AIX clients which have few NAS volumes mounted on it.

-These NAS volumes are created on NetApp Storage.
-For AIX clients , they have separate IP called (NAS IP) for NAS volume operations.
-For NetApp Storage, it has LIF IP(Logical Interface )
-Destinastination port on Storage for NAS communication are 2049 and 111
-NAS comminucation happens between this NAS IP on AIX clients to LIF IP on NetApp Storage.
-There are below settings on AIX clients, which you can check with nfso -a
nfs_use_reserved ports= 1 (use ports less than 1024)
nfs_use_reserved ports= 0(use ports more than 1024)
-as per security rule we should keep as " 1" .
-however keeping "0" value here does resolve the NAS issue of mounting but it is not safe as per SCD to allow NAS coomunication to happen between aix client NAS IP and storage LIF IP on random ports.
-but when we keep 1 we face the issue as it only takes 1021 1022 1023 ports as source port for mounting.
-Now what issue we are facing currently with nfs_use_reserved ports= 1 settings, That I will explain you.

-So when we keep nfs_use_reserved ports= 1 settings
clients sends "SYN" from 1021 soruce port to 2049 port on Storage
Storage sends SYN,ACK to from 2049 to 1021 port.
clients sends ACK to from 1021 to 2049 port on storage,
so 3 way hand shake is done.
and at the end of this connection on storage is established on port 1021 and is active.
Next
clients sends "SYN" from 1022 soruce port to 2049 port on Storage
Storage sends SYN,ACK to from 2049 to 1022 port.
clients sends ACK to from 1022 to 2049 port on storage,
so 3 way hand shake is done.
and at the end of this connection on storage is established on port 1022 and is active and now on storage both connection from client on ports 1021 and 1022 are active.
now here comes the problem part:-
dont know some how the connection from client gets broken on one port, lets say 1021 and clients starts sending the SYN request on port 1021 again ,BUT the connection broken info does not reach to storage and it remains active on port 1021.SO when client sends SYN request again from source port 1021, storage responds with ACK ( as connection is already established ) rather than SYN,ACK so firewall which sits in between the client and storage drops this packet from storage rather than reseting the connection, the result of which the client keeps on sending the SYN request from same source port 1021 and we face the issue of NAS mount points as NAS mount points dont get mounted on clients.
but when we keep nfs_use_reserved ports= 0 it uses random ports and still now we have not face any NAS issue on that client,

So my question is that how to define specific NAS source ports on AIX clients?

Hope you all have understood my issue now.

Let us know if any query.
Thanks
# 11  
Old 06-20-2018
It seems to me your problem is because of the firewall in between that is interfering with NFS communication. I think that the reason that you are having more problems with nfs_use_reserved_ports=1 is that there are fewer ports in the pool and you are therefore more likely to reuse a port that the Netapp SVM thinks is still in use. I think this can happen when the firewall interferes with normal communication and therefore the Netapp SVM has not learned that a port is no longer in use.

The firewall is probably configured to drop, rather than reject packets, so that is something that you could look into. Another thing to investigate is keep-alive signals and timeouts, to ensure that the firewall does not interfere..

That being said, it may be that your particular brand just does not work well with NFS, no matter what you try.

I am guessing that you are using a firewall to limit which systems are allowed to approach the filer, but I think it would be better if you put the firewall around the systems and the storage SVM so that there is a clear path between them, while also limiting which servers can approach the SVM.

Last edited by Scrutinizer; 06-20-2018 at 03:18 PM..
This User Gave Thanks to Scrutinizer For This Post:
# 12  
Old 06-20-2018
Quote:
Originally Posted by Scrutinizer
It seems to me your problem is because of the firewall in between that is interfering with NFS communication. I think that the reason that you are having more problems with nfs_use_reserved_ports=1 is that there are fewer ports in the pool and you are therefore more likely to reuse a port that the Netapp SVM thinks is still in use. It thinks this can happen when the firewall interferes with normal communication and therefore the Netapp SVM has not learned that a port is no longer in use.

The firewall is probably configured to drop, rather than reject packets, so that is something that you could look into. Another thing to investigate is keep-alive signals and timeouts, to ensure that the firewall does not interfere..

That being said, it may be that your particular brand just does not work well with NFS, no matter what you try.

I am guessing that you are using a firewall to limit which systems are allowed to approach the filer, but I think it would be better if you put the firewall around the systems and the storage SVM so that there is a clear path between them, while also limiting which servers can approach the SVM.
Well, we talked with Firewall team as well, but they are saying that it is the normal behavior of the firewall to drop the packets rather than sending reset.


Another plan of action to resolve this issue is
Plan 1
keep both NAS IP and Storage LIF IP in same VLAN and don't keep any firewall in between. (currently both NAS IP and Storage LIF IP are in different VLAN with firewall in between)

but I would like to know
Plan 2
What if we keep the same setup with communication happening from random source ports from client end to storage LIF ports with firewall in between,

which will be more secure plan 1 or Plan 2?


Thanks
# 13  
Old 06-20-2018
Quote:
Originally Posted by anil1000
Well, we talked with Firewall team as well, but they are saying that it is the normal behavior of the firewall to drop the packets rather than sending reset.
That is a matter of choice. To drop packets is more so legitimate in an Internet facing situation, but if you are using it for internal segmentation dropping will break stuff, while a reject is more graceful. There are pros and cons, but it is not "normal behavior" in the sense that it is the only possibility.

Besides this, there are options to keep connections alive, to change timeouts or to make the time longer before the firewall interferes.

Quote:
Another plan of action to resolve this issue is
Plan 1
keep both NAS IP and Storage LIF IP in same VLAN and don't keep any firewall in between. (currently both NAS IP and Storage LIF IP are in different VLAN with firewall in between)

but I would like to know
Plan 2
What if we keep the same setup with communication happening from random source ports from client end to storage LIF ports with firewall in between,

which will be more secure plan 1 or Plan 2?


Thanks
With plan 2 I think you may still have the problem once in a while. just less frequently. I personally would typically avoid sharing NFS through a firewall, unless you are using NFS with Kerberos. If you are using standard NFS with auth_sys authentication then in my opinion that is usually not a very secure situation and using reserved ports is not going to help that. But even with all that you described I do not know enough about your situation...

Last edited by Scrutinizer; 06-20-2018 at 04:49 PM..
# 14  
Old 06-21-2018
Besides this, there are options to keep connections alive, to change timeouts or to make the time longer before the firewall interferes.

How to keep it alive? What do you mean by this, which connection to keep it alive? Kindly suggest..

Code:
NFS_PORT_RANGE=udp[4000-5000]:tcp[7000-8000]

How to make this work? The Port range for NFS, this can also resolve the issue.

Thanks.

Last edited by rbatte1; 06-22-2018 at 07:16 AM.. Reason: Added CODE tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to release port on AIX?

Hello all, I need your help with any command to release a port on AIX. Thanks for all. (5 Replies)
Discussion started by: Mcipamo
5 Replies

2. AIX

XVFB Source package for AIX

Please send me link for XVFB Source package for AIX (3 Replies)
Discussion started by: prathap.g
3 Replies

3. Programming

Changing source port number of a TCP client packet

Hi all, I need to change the source port number of an outgoing TCP packet. First I have to bind the socket to a particular port(suppose 9001) but when I send the TCP packet I want to change the source port number lets say to 9002 still letting the socket to be bound to the same old port (9001).... (0 Replies)
Discussion started by: anuragrai134
0 Replies

4. AIX

Who's using my port in AIX

Hello Gurus, I was trying to find who's using my port and got below answer from a IBM website. But the problem with the below answer is I need a root to run the rmsock, is there any other alternative to find out who is using my port with out a root access?? 1. netstat -Aan | grep <port... (1 Reply)
Discussion started by: tenderfoot
1 Replies

5. AIX

Compiling samba from source in AIX 5.3

Hello all. I have never had any issues like this when compiling applications from source. When I try to compile samba-3.5.0pre2, configure runs with no issues, but when the time comes to make, this happens: make: make 1254-025 There must be an existing description file or specify a target. ... (4 Replies)
Discussion started by: raidzero
4 Replies

6. AIX

AIX(VIO/LPAR) with Free NAS ISCSI solution

Hi, I was looking on Google for AIX-VIO/LPAR with ISCSI solution and found following really nice tutorial about how to setup ISCSI with free NAS. 1) Build Your Own Open Source NAS Device Using FreeNAS | Train Signal Training - Free Computer Training Videos 2) Build Your Own Open Source... (4 Replies)
Discussion started by: kabir
4 Replies

7. UNIX for Advanced & Expert Users

how to port a package to huge source code having its own make and compilers

In general for intalling a package like we do ./configure, make , make install But if we want to integrate the package with a huge source base what are the things to be taken care could some one have a light on purpose of ./configure , make and make install along with above question. I... (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies

8. Programming

Source code for serial port

Hi, I am working with sun Solaris 5.9 and in my application,I have to communicate with Serial port(i.e /dev/term/a). So I need source code to by which I can do the following things-- 1)check the port is available or not.If it dosn't find the port,it should throw the error message(i.e. port not... (0 Replies)
Discussion started by: smartgupta
0 Replies

9. AIX

How to open a port in AIX

Hi Guys, i am trying to open a port in AIX. but i am not able to get the command for this. AIX is not having the iptables file present. So please any body can tell me how to open a port in AIX... Thanks sanju (2 Replies)
Discussion started by: sanju_d1231
2 Replies
Login or Register to Ask a Question