Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Can't ping/ssh FreeBSD from Gentoo.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 11, 2016 4:16 pm    Post subject: [SOLVED]Can't ping/ssh FreeBSD from Gentoo. Reply with quote

Hello fellows!

I just installed FreeBSD (192.168.0.254) on a small server and I can't ping/ssh it from my Gentoo (192.168.0.10) box. Basically I can ping/ssh from anything to anything on the network, including from FreeBSD to Gentoo, but not from Gentoo to FreeBSD. :evil:

Any idea?

Thanks!

EDIT: I can ping/ssh when using wireless on Gentoo but not wired.

Router Problem


Last edited by alexcortes on Tue Jul 12, 2016 6:59 pm; edited 1 time in total
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3493

PostPosted: Mon Jul 11, 2016 4:34 pm    Post subject: Reply with quote

1) firewall
2) routing (on both boxes. And I mean both, IP pools and metrics)

Also, loops in your network can cause really funny behaviour. Sometimes it's way more complicated than a packet storm shutting down the whole segment.
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Mon Jul 11, 2016 5:05 pm    Post subject: Reply with quote

Gentoo:

Code:
*nat
:PREROUTING ACCEPT [666283:91738361]
:INPUT ACCEPT [2584:390451]
:OUTPUT ACCEPT [1829537:201284060]
:POSTROUTING ACCEPT [1829797:201294460]
COMMIT
# Completed on Mon Jul 11 13:56:24 2016
# Generated by iptables-save v1.6.0 on Mon Jul 11 13:56:24 2016
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [2519258:210884412]
:TCP - [0:0]
:UDP - [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT
-A INPUT -p udp -m conntrack --ctstate NEW -j UDP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m conntrack --ctstate NEW -j TCP
-A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable
-A INPUT -p tcp -j REJECT --reject-with tcp-reset
-A INPUT -j REJECT --reject-with icmp-proto-unreachable
-A OUTPUT -p icmp -m conntrack --ctstate INVALID -j DROP
-A TCP -s 192.168.0.0/24 -p tcp -m tcp --dport 22000 -j ACCEPT
-A TCP -p tcp -m tcp --dport 6880 -j ACCEPT
-A TCP -s 192.168.0.0/24 -p tcp -m tcp --dport 1714:1764 -j ACCEPT
-A TCP -s 192.168.0.0/24 -p tcp -m tcp --dport 6600 -j ACCEPT
-A UDP -s 192.168.0.0/24 -p udp -m udp --dport 1714:1764 -j ACCEPT
COMMIT


Code:
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.10  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::1260:4bff:fe46:a51f  prefixlen 64  scopeid 0x20<link>
        ether 10:60:4b:46:a5:1f  txqueuelen 1000  (Ethernet)
        RX packets 210251  bytes 83956703 (80.0 MiB)
        RX errors 0  dropped 134  overruns 0  frame 0
        TX packets 161685  bytes 13611674 (12.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


FreeBSD (does not have a firewall up yet):

Code:
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=2008<VLAN_MTU,WOL_MAGIC>
        ether 00:e0:09:06:7d:44
        inet 192.168.0.254 netmask 0xffffff00 broadcast 192.168.0.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active


Router (DD-WRT)

Code:
Link encap:Ethernet  HWaddr E8:94:F6:2E:52:20 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21819 errors:0 dropped:147 overruns:0 frame:0
          TX packets:20447 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4289787 (4.0 MiB)  TX bytes:12000573 (11.4 MiB)


EDIT:

Gentoo Wireless (works)

Code:
wlo1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.5  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::678b:3242:9ec7:d757  prefixlen 64  scopeid 0x20<link>
        ether 40:2c:f4:34:67:71  txqueuelen 1000  (Ethernet)
        RX packets 7794  bytes 3500904 (3.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 25533
        TX packets 8318  bytes 1112297 (1.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 621
Location: France

PostPosted: Tue Jul 12, 2016 1:31 pm    Post subject: Reply with quote

netstat -rn (two distinct interfaces in the same network may cause routing problems) ?
Did you try tcpdump to monitor the network traffic between both boxes ?
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 12, 2016 3:27 pm    Post subject: Reply with quote

Gentoo

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eno1
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eno1


FreeBSD

Code:
Routing tables                                                                                                                                                                 
                                                                                                                                                                               
Internet:                                                                                                                                                                     
Destination        Gateway            Flags      Netif Expire                                                                                                                 
default            192.168.0.1        UGS         rl0                                                                                                                         
127.0.0.1          link#3             UH          lo0                                                                                                                         
192.168.0.0/24     link#2             U           rl0                                                                                                                         
192.168.0.254      link#2             UHS         lo0                                                                                                                         
                                                                                                                                                                               
Internet6:                                                                                                                                                                     
Destination                       Gateway                       Flags      Netif Expire                                                                                       
::/96                             ::1                           UGRS        lo0                                                                                               
::1                               link#3                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#3                        U           lo0
fe80::1%lo0                       link#3                        UHS         lo0
ff01::%lo0/32                     ::1                           U           lo0
ff02::/16                         ::1                           UGRS        lo0
ff02::%lo0/32                     ::1                           U           lo0


Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
xxx.xx.xx.x     0.0.0.0         255.255.224.0   U         0 0          0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 lo
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 br0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 br0


I will try tcpdump later.
I think I have a wireless card sitting here and I will try with it to see if this issue is hardware related.
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 12, 2016 5:08 pm    Post subject: Reply with quote

I do not have how to properly tcpdump the FreeBSD box right now because there are no display attached on it.

From Gentoo using wireless:

Code:
13:59:04.654560 IP 192.168.0.5 > 192.168.0.254: ICMP echo request, id 4122, seq 39, length 64


From Gentoo using wired:

Code:
14:04:23.419000 ARP, Request who-has 192.168.0.254 tell 192.168.0.10, length 28



I can't tcpdump from router.

Thanks.
Back to top
View user's profile Send private message
alexcortes
Apprentice
Apprentice


Joined: 18 Dec 2011
Posts: 205
Location: Rio de Janeiro, Brazil

PostPosted: Tue Jul 12, 2016 7:00 pm    Post subject: Reply with quote

I change the router for another one a and that did the trick. 8)

Thank you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum