Hi there, I am stuck with a problem I cannot resolve myself, unfortunately.
I have a RPI3 device with FreeBSD on it, which I want to act as a router with firewall. Mu initial intent to use it as a sort of MITM router that I can control and adapt firewall needs for the purposes of testing network connectivity on target device. Initial setup was a transparent bridge for two interfaces ue0 (internet connection) and ue1 (client connection). Now I need to change it to be able to use dnsmasq for custom dns resolution. The way I set it up right now:
ifconfig
ue0 facing the internet
ue1 facing the client
dhcpd.conf
I am also running dnsmasq as my dns server
dnsmasq.conf
and here is /etc/rc.conf
So the problem I am facing is that I get the IP on client, I get dns resolution on client too. But I cannot even ping any external (internet) addresses.
However I can ping gateway 192.168.31.1 and I can ping the external interface on the freebsd machine 192.168.50.70. And as I mentioned DNS is also working fine and resolves addresses as expected.
Any help will be appreciated.
Thank you
I have a RPI3 device with FreeBSD on it, which I want to act as a router with firewall. Mu initial intent to use it as a sort of MITM router that I can control and adapt firewall needs for the purposes of testing network connectivity on target device. Initial setup was a transparent bridge for two interfaces ue0 (internet connection) and ue1 (client connection). Now I need to change it to be able to use dnsmasq for custom dns resolution. The way I set it up right now:
ifconfig
Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
groups: lo
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ue0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
ether b8:27:eb:ec:b9:ed
inet 192.168.50.70 netmask 0xffffff00 broadcast 192.168.50.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=80000<LINKSTATE>
ether a0:ce:c8:5e:c7:1d
inet 192.168.31.1 netmask 0xffffff00 broadcast 192.168.31.255
media: Ethernet autoselect (1000baseT <full-duplex,master>)
status: active
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
ue1 facing the client
dhcpd.conf
Code:
# DHCPD config
option domain-name "void.com";
option domain-name-servers 192.168.31.1;
default-lease-time 600;
max-lease-time 7200;
authoritative;
subnet 192.168.31.0 netmask 255.255.255.0 {
range 192.168.31.10 192.168.31.254;
option broadcast-address 192.168.31.255;
option routers 192.168.31.1;
}
I am also running dnsmasq as my dns server
dnsmasq.conf
Code:
no-resolv
log-queries
interface=ue1
no-dhcp-interface=ue1
server=1.1.1.1
server=1.0.0.1
address=/example.com/1.2.3.4
and here is /etc/rc.conf
Code:
ifconfig_ue0="DHCP"
growfs_enable="YES"
powerd_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
#syslogd_enable="NO"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
# Enable Firewall
firewall_enable="YES"
firewall_type="OPEN"
gateway_enable="YES"
# Setup DHCPD on ue1
dhcpd_enable="YES"
ifconfig_ue1="inet 192.168.31.1 netmask 255.255.255.0"
dhcpd_ifaces="ue1"
# Enable dummynet
dummynet_enable="YES"
dnsmasq_enable="YES"
So the problem I am facing is that I get the IP on client, I get dns resolution on client too. But I cannot even ping any external (internet) addresses.
Code:
PING google.com (142.251.40.238): 56 data bytes
Request timeout for icmp_seq 0
However I can ping gateway 192.168.31.1 and I can ping the external interface on the freebsd machine 192.168.50.70. And as I mentioned DNS is also working fine and resolves addresses as expected.
Any help will be appreciated.
Thank you