B
B
bestdk22017-02-14 16:23:26
FreeBSD
bestdk2, 2017-02-14 16:23:26

How to configure natd to work with multiple interfaces?

Good afternoon.
There is a server with FreeBSD and three network interfaces:
em0 - interface to the Internet (address 10.0.2.15);
em1 - interface to the first local network, there is a machine 192.168.1.10 with an FTP server;
em2 - interface to the second local network (address 192.168.0.1)
The problem is to make natd work with 2 interfaces (em0 and em2), so that when accessing 10.0.2.15 or 192.168.0.1 via 21 via FTP, a redirect is made to 192.168.
As an option, you can run two natds, but I would like to try something more elegant. Found that natd has such a thing as instance. I tried these configs:
natd:
instance default
interface em0
port 8668
redirect_port tcp 192.168.1.10:20-21 20-21
instance local
interface em2
port 8888
redirect_port tcp 192.168.1.10:20-21 20-21
globalport 8000
When starting natd with this configuration, it returns null, although it hangs in natd processes. What is it connected with?
+ how to set up a firewall in this case?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
athacker, 2017-02-14
@bestdk2

natd is no longer relevant. Use nuclear nat. There you can raise several instances with different settings. man ipfw for examples of using NAT.

B
bestdk2, 2017-02-14
@bestdk2

I know that natd is out of date, but it just became interesting how to use instances in natd. But thanks, I'll try in nuclear nat.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question