On one occasion the Blessed One was living at Rajagaha in the Bamboo Grove, the Squirrels' Sanctuary. Now on that occasion a bhikkhu named Gulissani, a forest dweller of lax behaviour, had come on a visit to stay in the midst of the Sangha for some business or other. Venerable Sariputta addressed the bhikkhus with reference to the bhikkhu Gulissani thus: "Friends, when a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should be respectful and deferential towards his companions in the holy life. If he is disrespectful and un-deferential towards his companions in the holy life, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is disrespectful and un-deferential towards his companions in the holy life?' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should be respectful and deferential towards his companions in the holy life."
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should be skilled in good behaviour regarding seats thus: 'I shall sit down in such a way that I do not encroach upon elder bhikkhus and do not deny new bhikkhus a seat.' If he is not skilled in good behaviour regarding seats, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he does not even know what pertains to good behaviour?' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should be skilled in good behaviour regarding seats. "
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should not enter the village too early or return late in the day. If he enters the village too early and returns late in the day, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he enters the village too early and returns late in the day?' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should not enter the village too early or return late in the day."
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should not go before the meal or after the meal to visit families. If he goes before the meal or after the meal to visit families, there will be those who would say of him: 'Surely this venerable forest-dweller, while dwelling alone in the forest, doing as he likes, must be used to making untimely visits, since he behaves thus when he has come to the Sangha.' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should not go before the meal or after the meal to visit families."
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should not be haughty and personally vain. If he is haughty and personally vain, there will be those who would say of him: 'Surely this venerable forest-dweller, while dwelling alone in the forest, doing as he likes, must generally be haughty and personally vain, since he behaves thus when he has come to the Sangha.' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should not be haughty and personally vain."
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should not be rough-tongued and loose-spoken. If he is rough-tongued and loose-spoken, there will be those who would say of him: 'What has this venerable forest dweller gained by his dwelling alone in the forest, doing as he likes, since he is rough-tongued and loose-spoken?' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should not be rough-tongued and loose-spoken."
"When a forest-dwelling bhikkhu comes to the Sangha and is living in the Sangha, he should be easy to correct and should associate with good friends. If he is difficult to correct and associates with bad friends, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is difficult to correct and associates with bad friends?' Since there would be those who would say this of him, a forest-dwelling bhikkhu who has come to the Sangha and is living in the Sangha should be easy to correct and should associate with good friends. "
"A forest-dwelling bhikkhu should guard the doors of his sense faculties. If he does not guard the doors of his sense faculties, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he does not guard the doors of his sense faculties?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should guard the doors of his sense faculties. " "A forest-dwelling bhikkhu should be moderate in eating. If he is not moderate in eating, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is not moderate in eating?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be moderate in eating."
"A forest-dwelling bhikkhu should be devoted to wakefulness. If he is not devoted to wakefulness, there will be those would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is not devoted to wakefulness?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be devoted to wakefulness."
"A forest-dwelling bhikkhu should be energetic. If he is not energetic, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is lazy?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be energetic. "
"A forest-dwelling bhikkhu should be established in mindfulness. If he is unmindful, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is unmindful?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be established in mindfulness."
"A forest-dwelling bhikkhu should be concentrated. If he is not concentrated, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is not concentrated?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be concentrated."
"A forest-dwelling bhikkhu should be wise. If he is not wise, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he is not wise?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should be wise."
"A forest-dwelling bhikkhu should apply himself to the higher Dhamma and the higher Discipline. If he does not apply himself to the higher Dhamma and the higher Discipline, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he does not apply himself to the higher Dhamma and the higher Discipline?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should apply himself to the higher Dhamma and the higher Discipline." "A forest-dwelling bhikkhu should apply himself to those liberations that are peaceful and immaterial, transcending forms; for there are those who ask a forest-dwelling bhikkhu questions on the liberations that are peaceful and immaterial, transcending forms. If he does not apply himself to those liberations, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he does not apply himself to those liberations that are peaceful and immaterial, transcending forms?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should apply himself to those liberations that are peaceful and immaterial, transcending forms. "
"A forest-dwelling bhikkhu should apply himself to superhuman states, for there are those who ask a forest-dwelling bhikkhu questions on the superhuman states. If he does not apply himself to those states, there will be those who would say of him: 'What has this venerable forest-dweller gained by his dwelling alone in the forest, doing as he likes, since he does not apply himself to superhuman states?' Since there would be those who would say this of him, a forest-dwelling bhikkhu should apply himself to superhuman states."
When this was said, venerable Maha Moggallana asked the venerable Sariputta: "Friend Sariputta, should these things be undertaken and practiced only by a forest-dwelling bhikkhu or by a town-dwelling bhikkhu as well?" Sariputta replied: "Friend Moggallana, these things should be undertaken and practiced not only by a forest-dwelling bhikkhu, but by a town-dwelling bhikkhu as well."
In summary, Venerable Sāriputta noticed among the monks at Rājagaha an uncultured and misconducted monk staying in the forest who is called Gulissāni. Venerable Sāriputta then gave a discourse on the proper training of a forest-dwelling bhikkhu: he should show respect and consideration to others, be correct in the matter of seats, observe certain rules in asking for alms, avoid vanity, watch his speech, should not associate with bad friends, guards his sense doors, established in mindfulness and keep watch over his abilities while studying the higher Dhamma and Vinaya. Moggallāna asks whether these duties are incumbent only on those forest-dwelling monks and is told that the rules apply to the monks living in villages too.
References: 1. www.accesstoinsight.org 2. https://suttacentral.net/ 3. The middle length discourses of the Buddha (Bhikkhu Bodhi)