LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-20-2005, 01:05 AM   #1
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
IP/netmask:port notation question


I have a firewall, which lets me open a certain port, but there is only an IP block. I need, if possible, to block all traffic on port 1434, but I need to have this in the form of:

IP/netmask

and fit the port in there however it goes.

Here is how I think it would go:

0.0.0.0/0.0.0.0:1434

to block all traffic on port 1434 only.

Is this correct?

I don't want to accidently block all traffic, period.
 
Old 11-20-2005, 01:13 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
something like this should work. It assume that $IPTABLES is defined in your script.

$IPTABLES -A INPUT -p TCP -s 0/0 --source-port 1234 -j DROP
 
Old 11-20-2005, 05:58 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Original Poster
Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
This a firewall with an ssl gui. I don't have a command line unless I hook up all the stuff like keyboard, ay know. I really need the notation I requested, because that is what the firewall wants. So, please
something like this. I want to allow everything, except port 1434 on all IP's
0.0.0.0:1434/0.0.0.0:1434
 
Old 11-20-2005, 06:14 AM   #4
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
0.0.0.0 is understood as universal or everyone. So what you wrote should be interpretted as Every IP / Every Subnet @ port 1234 should be blocked.


The question will be does the software your using allow you to declare 0.0.0.0 or does it require you to input local IP address to block ports.
 
Old 11-20-2005, 08:36 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Original Poster
Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Musicman,

Thanks for the help. Unfortunately, the firewall will not accept a block rule which specifies a port. It will block all ports an IP, but not one port on all IP's. I've pretty much gotten the problem taken care of. This thread can be closed.
 
  


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
pointer notation vs array notation? pablowablo Programming 5 03-14-2005 12:34 PM
rtrive netmask vasdia Programming 0 02-25-2005 12:24 PM
Netmask? muppski Linux - Networking 5 01-30-2005 04:09 PM
netmask ray5_83 Linux - Networking 1 09-12-2004 11:20 AM
netmask spank Linux - Newbie 3 12-15-2003 09:12 AM

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

All times are GMT -5. The time now is 08:41 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