# 2 network interfaces, 2 ISP, blocked outgoing traffic



## JackVonThor (Oct 8, 2017)

Hello everybody.
I am having some problems with my FreeBSD Server (11.1 STABLE)

Let me explain the situation. I have two network interfaces (one ethernet, one wifi) with two ISP.
I have configured the routing table and the problem right now is that i can connect to the server, but the outgoing traffic is blocked, so when i am connected i cannot ping or connect to anything that is outside.

- This is my configuration:

Network0 (with Public IP), GW 109.200.80.225 , Mask 255.255.255.224 , interface EM0 IP: 109.200.80.235

Network1 (with internal IP), GW 192.168.1.1, Mask 255.255.255.0, internface WLAN0 (ath0) 192.168.1.24 (via DHCP)

Both networks have different separate ISP.

I have compiled the kernel so it supports net.fibs , my configuration files:

/boot/loader.conf

```
ipfw_load="YES"
net.fibs=8
```
/etc/rc.conf

```
ifconfig_em0="inet 109.200.80.235 netmask 255.255.255.224"
wlans_ath0="wlan0"
ifconfig_wlan0="dhcp"
#i did not set the default router
```
/etc/rc.local

```
setfib 0 route delete default
setfib 0 route add default 192.168.1.1

setfib 1 route delete default
setfib 1 route add default 109.200.80.225

ipfw -f flush

ipfw add allow ip from any to any via lo0
ipfw add setfib 1 ip from any to any via wlan0
ipfw add setfib 0 ip from any to any via em0
ipfw add allow ip from any to any
```
]

-When I type `setfib 0 netstat -rn` this is the output:

```
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.1.1        UGS       wlan0
109.200.80.224/27  link#1             U           em0
109.200.80.235     link#1             UHS         lo0
127.0.0.1          link#2             UH          lo0
192.168.1.0/24     link#3             U         wlan0
192.168.1.24       link#3             UHS         lo0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0
```
-When I type `setgib 1 netstat -rn` this is the output:

```
Routing tables (fib: 1)

Internet:
Destination        Gateway            Flags     Netif Expire
default            109.200.80.225     UGS         em0
109.200.80.224/27  link#1             U           em0
127.0.0.1          link#2             UH          lo0
192.168.1.0/24     link#3             U         wlan0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%lo0/64                     link#2                        U           lo0
ff02::/16                         ::1                           UGRS        lo0
```

-As I mentioned before, right now I can connect to the server but I cannot get access to the outgoing trafic, it seems like it is blocked.
`ipfw list` shows this:

```
00100 allow ip from any to any via lo0
00200 setfib 1 ip from any to any via wlan0
00300 setfib 0 ip from any to any via em0
00400 allow ip from any to any
65535 allow ip from any to any
```

What could be the problem? I would be grateful for any hints.

Thanks!


----------

