Need help with Java MulticastSocket

R

rick

I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work. I'm using the example from
the Java Tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html.

The relevant code is as follows (modified a bit here to make it simpler):

Server:

String testMsg = "TestMessage";
byte[] buf = testMsg.getBytes();
InetAddress group = InetAddress.getByName("230.0.0.1");
DatagramPacket packet;
packet = new DatagramPacket(buf, buf.length, group, 4446);
socket.send(packet);
System.out.println("Test message sent");

Client:

MulticastSocket socket;
socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
socket.joinGroup(address);
DatagramPacket packet;
byte[] buf = new byte[256];
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
String received = new String(packet.getData());
System.out.println("Message received: " + received);

I start the client first and it stops at "socket.receive(packet), which
I verify in a debugger. Then I start the server, which successfully sends
the DatagramPacket. No exceptions are thrown by either the client or
server. If I run "netstat -gn", I can see the 230.0.0.1 multicast group is
created when the client calls socket.joinGroup(). The problem is that the
client never receives the datagram from the server.

Help. I can't figure out what's going wrong here.

Thanks,

Rick
 
K

Knute Johnson

rick said:
I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work. I'm using the example from
the Java Tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html.

The relevant code is as follows (modified a bit here to make it simpler):

Server:

String testMsg = "TestMessage";
byte[] buf = testMsg.getBytes();
InetAddress group = InetAddress.getByName("230.0.0.1");
DatagramPacket packet;
packet = new DatagramPacket(buf, buf.length, group, 4446);
socket.send(packet);
System.out.println("Test message sent");

Client:

MulticastSocket socket;
socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
socket.joinGroup(address);
DatagramPacket packet;
byte[] buf = new byte[256];
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
String received = new String(packet.getData());
System.out.println("Message received: " + received);

I start the client first and it stops at "socket.receive(packet), which
I verify in a debugger. Then I start the server, which successfully sends
the DatagramPacket. No exceptions are thrown by either the client or
server. If I run "netstat -gn", I can see the 230.0.0.1 multicast group is
created when the client calls socket.joinGroup(). The problem is that the
client never receives the datagram from the server.

Help. I can't figure out what's going wrong here.

Thanks,

Rick

Rick:

Are you running IPTABLES? Could that have a chain that is blocking it?
 
R

rick

rick said:
I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work. I'm using the example from
the Java Tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html.

The relevant code is as follows (modified a bit here to make it simpler):

Server:

String testMsg = "TestMessage";
byte[] buf = testMsg.getBytes();
InetAddress group = InetAddress.getByName("230.0.0.1");
DatagramPacket packet;
packet = new DatagramPacket(buf, buf.length, group, 4446);
socket.send(packet);
System.out.println("Test message sent");

Client:

MulticastSocket socket;
socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
socket.joinGroup(address);
DatagramPacket packet;
byte[] buf = new byte[256];
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
String received = new String(packet.getData());
System.out.println("Message received: " + received);

I start the client first and it stops at "socket.receive(packet), which
I verify in a debugger. Then I start the server, which successfully sends
the DatagramPacket. No exceptions are thrown by either the client or
server. If I run "netstat -gn", I can see the 230.0.0.1 multicast group is
created when the client calls socket.joinGroup(). The problem is that the
client never receives the datagram from the server.

Help. I can't figure out what's going wrong here.

Thanks,

Rick

Rick:

Are you running IPTABLES? Could that have a chain that is blocking it?

I don't think so. I did a "ps -efw |grep iptables" and nothing found. I
did an "iptables --list -v", but I'm not sure what to look for in the
listing.

Thanks.
 
K

Knute Johnson

rick said:
rick said:
I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work. I'm using the example from
the Java Tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html.

The relevant code is as follows (modified a bit here to make it simpler):

Server:

String testMsg = "TestMessage";
byte[] buf = testMsg.getBytes();
InetAddress group = InetAddress.getByName("230.0.0.1");
DatagramPacket packet;
packet = new DatagramPacket(buf, buf.length, group, 4446);
socket.send(packet);
System.out.println("Test message sent");

Client:

MulticastSocket socket;
socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
socket.joinGroup(address);
DatagramPacket packet;
byte[] buf = new byte[256];
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
String received = new String(packet.getData());
System.out.println("Message received: " + received);

I start the client first and it stops at "socket.receive(packet), which
I verify in a debugger. Then I start the server, which successfully sends
the DatagramPacket. No exceptions are thrown by either the client or
server. If I run "netstat -gn", I can see the 230.0.0.1 multicast group is
created when the client calls socket.joinGroup(). The problem is that the
client never receives the datagram from the server.

Help. I can't figure out what's going wrong here.

Thanks,

Rick

Rick:

Are you running IPTABLES? Could that have a chain that is blocking it?


I don't think so. I did a "ps -efw |grep iptables" and nothing found. I
did an "iptables --list -v", but I'm not sure what to look for in the
listing.

Thanks.

I don't see anything wrong, why don't you post a compilable test that
doesn't work so we can try it.
 
R

rick

rick said:
rick wrote:

I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work. I'm using the example from
the Java Tutorial:
http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html.

The relevant code is as follows (modified a bit here to make it simpler):

Server:

String testMsg = "TestMessage";
byte[] buf = testMsg.getBytes();
InetAddress group = InetAddress.getByName("230.0.0.1");
DatagramPacket packet;
packet = new DatagramPacket(buf, buf.length, group, 4446);
socket.send(packet);
System.out.println("Test message sent");

Client:

MulticastSocket socket;
socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
socket.joinGroup(address);
DatagramPacket packet;
byte[] buf = new byte[256];
packet = new DatagramPacket(buf, buf.length);
socket.receive(packet);
String received = new String(packet.getData());
System.out.println("Message received: " + received);

I start the client first and it stops at "socket.receive(packet), which
I verify in a debugger. Then I start the server, which successfully sends
the DatagramPacket. No exceptions are thrown by either the client or
server. If I run "netstat -gn", I can see the 230.0.0.1 multicast group is
created when the client calls socket.joinGroup(). The problem is that the
client never receives the datagram from the server.

Help. I can't figure out what's going wrong here.

Thanks,

Rick

Rick:

Are you running IPTABLES? Could that have a chain that is blocking it?


I don't think so. I did a "ps -efw |grep iptables" and nothing found. I
did an "iptables --list -v", but I'm not sure what to look for in the
listing.

Thanks.

I don't see anything wrong, why don't you post a compilable test that
doesn't work so we can try it.

Hmmm. Me neither. One fact that I failed to mention is that I had
this code working a year ago on the same machine. I'm working on
a project that I put away and have resurrected and have found
this feature not working anymore.

The code can be obtained from the Java Tutorial website.
Here are links to the tutorial page and the files to download:

The tutorial:

http://java.sun.com/docs/books/tutorial/networking/datagrams/broadcasting.html

Files:

http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/MulticastServer.java
http://java.sun.com/docs/books/tuto...rams/example-1dot1/MulticastServerThread.java
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/MulticastClient.java
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/QuoteServerThread.java
http://java.sun.com/docs/books/tutorial/networking/datagrams/example-1dot1/one-liners.txt

Instructions:

First run MulticastClient.class, which does a MulticastSocket.joinGroup().
Then run MulticastServer.class, which sends DatagramPacketS to the
multicast group, which the client is supposed to receive and print to
standard out.

I'm running Java 1.5.0 build 1.5.0-b64 on Linux 2.6 kernel. I tried
running this from the command line and from Eclipse. Same result.

Thanks very much for your efforts.
 
K

Knute Johnson

Try this and let me know if it works.

import java.io.*;
import java.net.*;

public class mtest {
public mtest() {
Runnable server = new Runnable() {
public void run() {
try {
int n = 0;
InetAddress address =
InetAddress.getByName("230.0.0.1");
DatagramSocket ds = new DatagramSocket();
while (true) {
byte[] buf = Integer.toString(n++).getBytes();
DatagramPacket dp = new
DatagramPacket(buf,buf.length,
address,12345);
ds.send(dp);
try { Thread.sleep(1000);
} catch (InterruptedException ie) { }
}
} catch (IOException ioe) {
ioe.printStackTrace();
System.exit(0);
}
}
};

Runnable client = new Runnable() {
public void run() {
try {
InetAddress group = InetAddress.getByName("230.0.0.1");
MulticastSocket ms = new MulticastSocket(12345);
ms.joinGroup(group);
while (true) {
byte[] buf = new byte[32];
DatagramPacket dp = new
DatagramPacket(buf,buf.length);
ms.receive(dp);
String str = new
String(dp.getData(),dp.getOffset(),
dp.getLength());
System.out.println(str);
}
} catch (IOException ioe) {
ioe.printStackTrace();
System.exit(0);
}
}
};

new Thread(client).start();
new Thread(server).start();
}

public static void main(String[] args) {
new mtest();
}
}
 
G

Gordon Beaton

I'm trying to use Java multicasting on a single computer (Linux) for
testing purposes and can't get it to work.

Your code works for me on a Fedora 2 machine (although I needed to
declare a DatagramSocket for the server).

All I can suggest is that you run ethereal or tcpdump and see if that
gives you any more information.

/gordon
 
R

rick

That doesn't work either. Same result. The sender sends, but nothing
is ever received...very strange. I assume that the example from
the Java Tutorial worked for you?

Rick
 
K

Knute Johnson

rick said:
That doesn't work either. Same result. The sender sends, but nothing
is ever received...very strange. I assume that the example from
the Java Tutorial worked for you?

Rick

Rick:

I just wrote that one to see if it would work. It works fine on XP but
didn't work on Linux until I opened a port in the firewall. I'm pretty
sure that's where your problem is. You didn't say which version of
Linux you are running but in FC they use iptables.
 
R

rick

Knute,

You're a genius! Ok, here's what I did. I poked around my system
and found a program called Guarddog, which manages iptables via
a very nice GUI. As a simple test, I temporarily disabled the
firewall completely and then ran your multicast program. Well,
obviously, it worked. I still have a question. Can you give me
some guidance on what setting in the firewall is likely causing
my problem here. Clearly, I don't want to disable the entire
firewall. Also, do you know if most Linux systems are likely to
be configured with this setting restricted, preventing multicast
from working?

Thanks again.

Rick
 
R

rick

Assuming that multicasting uses UDP (is that correct?) I added a UDP port
matching the port used in our multicasting test program via Guarddog.
Guarddog indicated that iptables was successfully updated, but when I do
an "iptables -L" to get a listing, the UDP port I added is not included
in the listing. And the multicast test still doesn't work. Do you know
what I'm missing here?

Thanks,

Rick
 
K

Knute Johnson

rick said:
Knute,

You're a genius! Ok, here's what I did. I poked around my system
and found a program called Guarddog, which manages iptables via
a very nice GUI. As a simple test, I temporarily disabled the
firewall completely and then ran your multicast program. Well,
obviously, it worked. I still have a question. Can you give me
some guidance on what setting in the firewall is likely causing
my problem here. Clearly, I don't want to disable the entire
firewall. Also, do you know if most Linux systems are likely to
be configured with this setting restricted, preventing multicast
from working?

Thanks again.

Rick

You just need to open the port you are going to listen on. So if you
are going to listen on port 12345 you need a chain on the INPUT side
that has an ACCEPT for UDP on that port. The syntax of iptables is kind
of complicated so it might be simpler to use your Guarddog program to
open the UDP port. If that doesn't work, let me know and I'll fire up my
Linux box and see what I can come up with.
 
K

Knute Johnson

rick said:
Assuming that multicasting uses UDP (is that correct?) I added a UDP port
matching the port used in our multicasting test program via Guarddog.
Guarddog indicated that iptables was successfully updated, but when I do
an "iptables -L" to get a listing, the UDP port I added is not included
in the listing. And the multicast test still doesn't work. Do you know
what I'm missing here?

Thanks,

Rick

I'm not sure. Try an iptables -L and see if there is a chain with the
UDP port in it. And post the output of iptables -L here too.
 
R

rick

I'm not sure. Try an iptables -L and see if there is a chain with the
UDP port in it. And post the output of iptables -L here too.

I had done an iptables -L (see above). I tried again with Guarddog (added
12345 to match your program) and it doesn't show up. Here's the output:
(btw, I really appreciate your help so far. If you don't know why Guarddog
isn't working, perhaps I should take this question to a more appropriate
forum rather than taking more of your time. If so, just let me know.)

root@1[scripts]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- 192.168.1.101 192.168.1.255
logaborted tcp -- anywhere anywhere state RELATED,ESTABLISHED tcp flags:RST/RST
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
nicfilt all -- anywhere anywhere
srcfilt all -- anywhere anywhere

Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
srcfilt all -- anywhere anywhere

Chain OUTPUT (policy DROP)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp parameter-problem
s1 all -- anywhere anywhere

Chain f0to1 (3 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:ipp state NEW
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ns state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:65535 dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spts:1024:65535 dpt:netbios-dgm
ACCEPT udp -- anywhere anywhere udp spt:netbios-dgm dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ssn state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:65535 dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:6969 state NEW
ACCEPT icmp -- anywhere anywhere icmp source-quench
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:www state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:webcache state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:8008 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:8000 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpt:8888 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:microsoft-ds state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:6881:6889 state NEW
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpts:1024:5999
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spt:netbios-dgm dpt:netbios-dgm
ACCEPT icmp -- anywhere anywhere icmp echo-reply
ACCEPT udp -- anywhere anywhere udp dpts:6970:7170
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:6881:6889 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state NEW
logdrop all -- anywhere anywhere

Chain f1to0 (1 references)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpts:1024:65535
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spt:netbios-dgm dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:6881:6889 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:ipp state NEW
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT tcp -- anywhere anywhere tcp dpt:domain state NEW
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:smtp state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ns state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spt:netbios-ns dpt:netbios-ns
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpt:netbios-dgm
ACCEPT udp -- anywhere anywhere udp spt:netbios-dgm dpt:netbios-dgm
ACCEPT tcp -- anywhere anywhere tcp dpt:netbios-ssn state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpt:netbios-ssn
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:1723 state NEW
ACCEPT gre -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpt:time
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:time state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:kerberos state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:whois state NEW
ACCEPT udp -- anywhere anywhere udp dpt:43
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:6660:6669 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:ftp state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:https state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:ldap state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:522 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:1503 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:1720 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:1731 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:1024:65535 state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpts:1024:65535
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:5050 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:telnet state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:5000:5001 state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpt:5000
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:6969 state NEW
ACCEPT udp -- anywhere anywhere udp dpt:ntp
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:pop3 state NEW
ACCEPT udp -- anywhere anywhere udp dpts:5060:5061
ACCEPT icmp -- anywhere anywhere icmp echo-request
ACCEPT tcp -- anywhere anywhere tcp dpt:554 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:7070 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:xmpp-client state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:5190:5193 state NEW
ACCEPT udp -- anywhere anywhere udp spts:1024:5999 dpts:5190:5193
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:imaps state NEW
ACCEPT udp -- anywhere anywhere udp dpt:3478
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:ssh state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:0:1023 dpt:ssh state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:3030 state NEW
ACCEPT icmp -- anywhere anywhere icmp source-quench
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:pop3s state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:dict state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:8765 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:nntp state NEW
ACCEPT udp -- anywhere anywhere udp dpts:33434:33600
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:www state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:webcache state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:8008 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:8000 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:8888 state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:printer state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:microsoft-ds state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpts:6881:6889 state NEW
ACCEPT udp -- anywhere anywhere udp dpt:4000
ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:imap2 state NEW
ACCEPT udp -- anywhere anywhere udp dpt:imap2
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:rsync state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:gnutella-svc state NEW
ACCEPT tcp -- anywhere anywhere tcp spts:1024:5999 dpt:1863 state NEW
logdrop all -- anywhere anywhere

Chain logaborted (1 references)
target prot opt source destination
logaborted2 all -- anywhere anywhere limit: avg 1/sec burst 10
LOG all -- anywhere anywhere limit: avg 2/min burst 1 LOG level warning prefix `LIMITED '

Chain logaborted2 (1 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning tcp-sequence tcp-options ip-options prefix `ABORTED '
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED

Chain logdrop (4 references)
target prot opt source destination
logdrop2 all -- anywhere anywhere limit: avg 1/sec burst 10
LOG all -- anywhere anywhere limit: avg 2/min burst 1 LOG level warning prefix `LIMITED '
DROP all -- anywhere anywhere

Chain logdrop2 (1 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning tcp-sequence tcp-options ip-options prefix `DROPPED '
DROP all -- anywhere anywhere

Chain logreject (0 references)
target prot opt source destination
logreject2 all -- anywhere anywhere

Chain logreject2 (1 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable
DROP all -- anywhere anywhere

Chain nicfilt (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
RETURN all -- anywhere anywhere
logdrop all -- anywhere anywhere

Chain s0 (1 references)
target prot opt source destination
f0to1 all -- anywhere 192.168.1.101
f0to1 all -- anywhere 192.168.1.255
f0to1 all -- anywhere xtech
logdrop all -- anywhere anywhere

Chain s1 (1 references)
target prot opt source destination
f1to0 all -- anywhere anywhere

Chain srcfilt (2 references)
target prot opt source destination
s0 all -- anywhere anywhere
 
K

Knute Johnson

rick said:
I had done an iptables -L (see above). I tried again with Guarddog (added
12345 to match your program) and it doesn't show up. Here's the output:
(btw, I really appreciate your help so far. If you don't know why Guarddog
isn't working, perhaps I should take this question to a more appropriate
forum rather than taking more of your time. If so, just let me know.)

Probably a good idea to ask somebody that knows something about
Guarddog, cause I don't have a clue. You are right though, there is not
a chain in there with UDP port 12345. I don't know if you are running
Fedora or not but there is a good list at
http://www.redhat.com/mailman/listinfo/fedora-list
They'll help even if you are running some other linux.
 
R

rick

Knute,

Thank you for your help. I had no idea what the problem was and you've
given me the info needed to get a solution. I really appreciate it. FYI,
I'm using MEPIS, a Debian derivative.

Rick
 
K

Knute Johnson

rick said:
Knute,

Thank you for your help. I had no idea what the problem was and you've
given me the info needed to get a solution. I really appreciate it. FYI,
I'm using MEPIS, a Debian derivative.

Rick

Don't hesitate to ask questions anytime. I haven't heard of MEPIS but
there may be a list specific to them too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top