LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-05-2014, 04:39 AM   #1
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Rep: Reputation: 22
Post Filter a service or Port Via Firewall.


Hello all.
I want to use a Service or Port like Samba but don't want to disable Firewall for Samba service.
I know that if I can't browse my Linux share via Samba it is because of Firewall and When I disable Firewall for Samba it is worked. I want to know how can I use Samba service with Enabled firewall.


Cheers.
 
Old 12-05-2014, 09:12 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jokar.mohsen View Post
Hello all.
I want to use a Service or Port like Samba but don't want to disable Firewall for Samba service.
I know that if I can't browse my Linux share via Samba it is because of Firewall and When I disable Firewall for Samba it is worked. I want to know how can I use Samba service with Enabled firewall.
You said previously that you are a network administrator; you asked before about how to use other services through a firewall:
http://www.linuxquestions.org/questi...ip-4175525500/

...and this is NO DIFFERENT. As a network administrator, you should already know you have two choices:
  1. NAT the port on your firewall/router/DMZ equipment
  2. Open the port in your firewall
That's it. Those are, and will remain, your only two options. Choose one. Again, it DOES NOT MATTER what the service is, you NAT everything the same way...take the incoming traffic on your public IP address/port, and NAT it to something else internally. What the service is, is TOTALLY IRRELEVANT...it works the same way for ANY network traffic.
 
1 members found this post helpful.
Old 12-20-2014, 08:21 AM   #3
jokar.mohsen
Member
 
Registered: Jul 2008
Location: Tehran
Posts: 441

Original Poster
Rep: Reputation: 22
Quote:
Originally Posted by TB0ne View Post
You said previously that you are a network administrator; you asked before about how to use other services through a firewall:
http://www.linuxquestions.org/questi...ip-4175525500/

...and this is NO DIFFERENT. As a network administrator, you should already know you have two choices:
  1. NAT the port on your firewall/router/DMZ equipment
  2. Open the port in your firewall
That's it. Those are, and will remain, your only two options. Choose one. Again, it DOES NOT MATTER what the service is, you NAT everything the same way...take the incoming traffic on your public IP address/port, and NAT it to something else internally. What the service is, is TOTALLY IRRELEVANT...it works the same way for ANY network traffic.
I don't know what is your Goal and I don't know also why you thinking that a Network administrator must be know everything. I guess you claim it but you can't answer my question about Sound card. Please ignore my questions!!!!
 
Old 12-20-2014, 09:41 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by jokar.mohsen View Post
I don't know what is your Goal and I don't know also why you thinking that a Network administrator must be know everything.
I would think that a network administrator would KNOW ABOUT NETWORKS. So why don't you? The options are the same as I told you before, and no matter WHAT service/port you're after, they're going to REMAIN the same. Re-read the first reply.
Quote:
I guess you claim it but you can't answer my question about Sound card. Please ignore my questions!!!!
Your questions WERE answered, but you ignored them. Again, YOU manually tried to do something, and broke your system. You STILL haven't answered questions in your other threads about your sound card about basic diagnostics, or other things to try, so complaining that we can't 'fix' your problems is wrong.

You CONTINUE to not post relevant details, you ignore advice given to you, you don't answer questions when asked, and you have done this for a LONG time now, on MANY subjects. Again, if you're not going to follow the LQ Rules and guidelines, not going to take advice, suggestions, or answer questions, there is NO POINT in you posting.
 
Old 12-20-2014, 07:33 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by jokar.mohsen View Post
I want to know how can I use Samba service with Enabled firewall.
Find out which ports the Samba service needs then pierce a hole in your firewall for them but limit access to the hosts or subnets that require access.

If unsure:
0) list which ports you think Samba requires,
1) post your unaltered 'iptables-save' output and
2) the proposed changes in terms of ports and host access.
 
Old 12-21-2014, 10:27 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by unSpawn View Post
Find out which ports the Samba service needs then pierce a hole in your firewall for them but limit access to the hosts or subnets that require access.

If unsure:
0) list which ports you think Samba requires,
1) post your unaltered 'iptables-save' output and
2) the proposed changes in terms of ports and host access.
Exactly...that was proposed in the first reply here, and in another thread, where the OP posted about another service. They were also prompted for information about their firewall/router/setup, but that didn't meet with much success.
 
  


Reply



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
packet filter firewall kikilinux Programming 2 03-10-2013 04:58 PM
Need to change listening port of rusersd service to a static port vokuro Linux - Networking 0 02-01-2012 05:25 PM
Firewall and webcontent filter jocast Linux - Security 8 05-15-2009 06:54 AM
packet filter firewall naveenpurswani Programming 2 03-29-2004 02:54 PM
content filter on firewall Nerun Linux - Security 3 02-21-2002 04:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:06 PM.

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