K
K
kissbohda2014-07-28 11:33:40
FreeBSD
kissbohda, 2014-07-28 11:33:40

How to redirect unknown users from one subnet to another ubuntu OS?

How to create a transition to the address 172.32.0.1 from one subnet 172.32.0.0? I have a manual on how to make this setting in freebsd, how to convert it to ubuntu 12?
1. In freebsd dhcp config:

subnet 172.32.0.0 netmask 255.255.240.0 {
default-lease-time 3600;
option domain-name "isp";
option subnet-mask 255.255.240.0;
option domain-name-servers 172.32.0.1;
option routers 172.32.0.1;
range 172.32.0.100 172.32.0.254;

2. In freebsd alias in /etc/rc.conf:
ifconfig_em0_alias0="inet 172.32.0.1 netmask 255.255.240.0"

3. In freebsd wrap itself, for this subnet in /etc/firewall.conf:
unknown users redirect
${FwCMD} add 5 fwd 127.0.0.1,80 ip from 172.32.0.0/20 to not me dst-port 80

How to do this in Ubuntu?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-07-28
@kissbohda

So this is completely different. According to your link, as I understand it, they are trying to build a captive portal. But for these purposes, there are ready-made solutions. pfsense for example

K
kissbohda, 2014-07-28
@kissbohda

I'm sorry, maybe I didn't add something, you need to do it this way, when someone wants to open the vk.com website, it will be transferred to 172.32.0.1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question