[EMAIL PROTECTED] wrote:

Hello,

I've a problem with bering 1.2 networking that I can't imagine.
once I've install my bering 1.2 network


#
# Loopback interface.
auto lo eth0
iface lo inet loopback
#
# Option 1.2: eth0 / Fixed IP (assumed to be 1.2.3.4).
#               (broadcast/gateway optional)
iface eth0 inet static
address 10.0.0.150
masklen 24
gateway 10.0.0.100


if I ping for example 66.102.11.99 # ping 66.102.11.99 PING 66.102.11.99 (66.102.11.99): 56 data bytes 64 bytes from 66.102.11.99: icmp_seq=0 ttl=247 time=44.0 ms 64 bytes from 66.102.11.99: icmp_seq=1 ttl=247 time=43.4 ms 64 bytes from 66.102.11.99: icmp_seq=2 ttl=247 time=42.8 ms 64 bytes from 66.102.11.99: icmp_seq=3 ttl=247 time=44.5 ms

--- 66.102.11.99 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 42.8/43.6/44.5 ms

but if I start my test program to connect to server I have problem.
# ./test 66.102.11.99
hostname: 66.102.11.99
gethostbyname(hostname)
/gethostbyname(hostname)
create socket
/create socket (3)
bind any port number
/bind any port number
connect to server                        // problem to connect

--------------------------------------------------------------
# here is the source code of the test program
--------------------------------------------------------------

<snip>

I can't comment directly on the C code, as I don't do networking in C, but have you checked your logs? IIRC, by default Shorewall doesn't allow the firewall to connect to any outside ports, unless you specifically allow it.

You could also be running into other problems...I ran afoul of some of the grsecurity patches via an ssh session, and didn't figure out what was going on until I tried from the true console and saw the error messages (that were getting dumped into the log files all along)...you could be having a similar problem, although I suspect it's likely just firewall rules.

Also, you indicate "//problem to connect", which is not anything the source code you provided would print out. Specific details would help, ie: is there a big delay then your program exits (list the delay...DNS and TCP timeouts are pretty easy to identify by the delay), and exactly what your program prints out (it's unclear what is actual program output, above, and what is inline commenting provided by you).

--
Charles Steinkuehler
[EMAIL PROTECTED]


------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt ------------------------------------------------------------------------ leaf-user mailing list: [email protected] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to