LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   IP/netmask:port notation question (https://www.linuxquestions.org/questions/linux-networking-3/ip-netmask-port-notation-question-384805/)

AwesomeMachine 11-20-2005 01:05 AM

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.

musicman_ace 11-20-2005 01:13 AM

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

AwesomeMachine 11-20-2005 05:58 AM

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

musicman_ace 11-20-2005 06:14 AM

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.

AwesomeMachine 11-20-2005 08:36 PM

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.


All times are GMT -5. The time now is 05:59 AM.