K
K
kos_fist2013-08-15 09:41:24
linux
kos_fist, 2013-08-15 09:41:24

Redirecting outgoing local traffic in iptables from one IP to another?

Greetings!
Need help setting up iptables rules for the following task.
Available:
Server1: 10.10.10.10:80(int), 195.195.195.195:80(ext) Self
-written software_1 is spinning (there are no sources). Hangs on apache on both interfaces.
Server2: 195.195.195.200 Self-written software_2 is
spinning (there are no sources), which accesses Server1 10.10.10.10:80 and takes some content.
But there is no access via FW to 10.10.10.10:80 and cannot be. But there is access to 195.195.195.195:80
Task:
In order not to suffer with the software, you need to configure iptables on Server2 so that all requests that the software tries to make by 10.10.10.10:80 are automatically wrapped on 195.195.195.195:80

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
merlin-vrn, 2013-08-15
@kos_fist

iptables -t nat -A OUTPUT -d 10.10.10.10 -p tcp --dport 80 -j DNAT --to-destination 195.195.195.195:80

M
m00nkey, 2014-07-10
@m00nkey

hmm ... and if there is a similar task, but you need to redirect not from IP to IP, but to different interfaces, i.e. from eth0 to tap0.
Can this be implemented somehow?

A
Aligatro, 2014-10-14
@Aligatro

You have a strange layout, but still, if you are interested in positioning the block in the middle, you need to change the values ​​of left and top in this block. This is if it's fast.

.izhstal-sektor1-2 {
position: absolute;
left: 700px;
top: -20px;
z-index: 999;
background: url(../images/diag-hover.png) -9999px -9999px no-repeat;
padding-top: 10px;
width: 240px;
height: 226px;
}

Z
zooks, 2014-10-15
@zooks

Whenever I see this question. Already write a margin-top for the block or hire a specialist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question