V
V
ValdikSS2011-12-06 16:46:28
linux
ValdikSS, 2011-12-06 16:46:28

Give out two real addresses?

Hello!
Please help me solve the problem. I can't figure out how to do it.
I have a / 27 subnet from my provider, in which 2 addresses are available to me.
Now I have a home server that has 2 network cards. On one, the provider / 27 is raised, on the other 192.168.0.1/24, the cable of which is inserted into the router (dir-320), the ports of which are all in the same vlan, and work as a bridge + Wi-Fi bridge.
One computer is connected by wire, the rest are via wifi. I want to be able to use the second address without nat on this computer.
Those. xxx.xxx.102.76/27 and xxx.xxx.102.77/27 are available to me.
Now that computer has static 192.168.0.10/24, gateway 192.168.0.1, on the server -s 192.168.0.10 -j SNAT --to xxx.xxx.102.76 and -d xxx.xxx.102.76 -j DNAT --to 192.168 .0.10.
I want to get rid of this by giving the computer xxx.xxx.102.76.
Suppose I have registered a route to xxx.xxx.102.76 on the interface where the LAN is connected, and then what? What to prescribe the gateway?
There would be 3 addresses, I would assign .76 to the interface where the Internet is, .77 where the locale is and .78 to the computer.
If that doesn't work, is there a way to do a Full-cone nat from this / to this address without populating the conntrack table (notrack)? Tried -j SAME, -j NETMAP, - uses conntrack, when added to -t raw -j NOTRACK, packets do not go.
The main idea is to offload the server.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
ValdikSS, 2011-12-07
@ValdikSS

I didn't think it would be difficult. I compiled xtables, tried to use all combinations of RAWSNAT, RAWDNAT and NOTRACK - they still track. I tried to use nat from iproute2 - everything has been broken there for a long time and does not work, for one thing I accidentally cleared the rules table and now I will need to somehow restart the server. I will try the method through tc.

S
shadowalone, 2011-12-06
@shadowalone

Make a bridge on the first computer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question