Questions tagged [dnat]
92 questions
0
votes
1 answer
iptables NAT forward range
I have two network interfaces, eth0 and eth1. eth0 has a public ip, eth1 has 172.16.0.254/24.
I'd like to do the following mapping:
172.16.0.1:22 -> eth0's public ip:2001
172.16.0.2:22 -> eth0's public ip:2002
172.16.0.3:22 -> eth0's public ip:2003…
![](../../users/profiles/215316.webp)
rralf
- 121
- 3
0
votes
2 answers
Forward web request to another computer
I have one notebook and two servers:
ip = 172.17.0.2 (I have installed nginx here)
ip = 172.17.0.3 (There is nothing here, but I can ping 172.17.0.2 from here)
I open browser on my notebook, open
http://172.17.0.2
and get web page from…
![](../../users/profiles/61755.webp)
ceth
- 506
- 1
- 7
- 16
0
votes
1 answer
Do any applications using port forwarding require the SNAT address = external DNAT address?
We use iptables to implement SNAT for our users with a dozen external IP's in round robin (for load balancing). Our developers require port forwarding to their machines and have each requestded a range of 10 ports on which they can expose their…
![](../../users/profiles/35498.webp)
Michelle
- 913
- 5
- 20
- 30
0
votes
1 answer
iptables with DNAT and multiple gateways: How to route replies to correct gateway?
I have a problem setting up iptables rules and routes on a Linux client for a scenario with DNAT and multiple gateways:
We have two gateways to the Internet. The first has a fixed IP, the second offers a better bandwidth. Both gateways do SNAT for…
![](../../users/profiles/5073.webp)
flight
- 384
- 3
- 14
0
votes
1 answer
DNATing multiple ips not working
i have centos box with public ip on eth0 and private ip on eth1,4 pub ips are aliased on eth0.
I have written DNAT rule to NAT request on 1.1.1.3 to 10.10.10.3 it worked fine,
but when i add more DNAT rule it is not working.
What can be the…
![](../../users/profiles/156176.webp)
kevin
- 191
- 5
- 15
0
votes
2 answers
ASA 5505 outside access for clients with dynamically assigned IPs, no outside access for clients with static IPs
We have an ASA configured to access the internet, which works fine for clients who have an IP address assigned by DHCP, but not for clients with manually assigned IPs.
For instance, with the DHCP server configured to give IP addresses between…
![](../../users/profiles/158197.webp)
John
- 1
- 2
0
votes
2 answers
NAT with iptables: need help understanding
i am trying to learn NAT with iptables but i ran into some confusions.
i am having two virtual machines with ips 18.43 lets say B and 18.42 C running webservers on port 80.
i need to NAT every traffic coming on B:80 to C:80 (Do not want to use any…
![](../../users/profiles/130107.webp)
Kevin Parker
- 757
- 1
- 13
- 29
0
votes
0 answers
1:1 NAT or MultiIP for WAN implementation on OpenWRT NFTABLES (fw4)
I would like to configure 1:1 NAT for my ISP modem connected to my OpenWRT WAN interface.
The modem IP address is 10.70.70.1 and I want to map it on my OpenWRT LAN bridge (192.168.64.0/24) with IP address 192.168.64.171.
My DHCP range for the LAN…
![](../../users/profiles/477428.webp)
Sina S.
- 11
- 1
- 2
0
votes
0 answers
How to avoid port duplication when using iptable for DNAT
I configure the iptable output chain DNAT conversion by the following command.
iptables -t nat -A OUTPUT -p tcp --dport 5000 -j DNAT --to 10.100.1.10:2048
When I link 10.100.20.4:5000 on the client 10.100.30.5, the traffic is successfully forwarded…
![](../../users/profiles/979701.webp)
HK S
- 1
0
votes
1 answer
nftables natting with source IP
I have a server in a datacenter which is a Proxmox server. On the server (one of many, they are in a Proxmox cluster) I am hosting various VM's.
Services on the VM's are exposed through iptables (using ufw) natting like the following example:
-A…
![](../../users/profiles/931841.webp)
nobody
- 103
- 2
0
votes
0 answers
how can I NAT a NAT IP
I have a server on AWS with a floating (secondary) IP. During integrations with a partner I provide my secondary IP to be whitelisted and define a POSTROUTING rule to SNAT my IP to the secondary IP to reach to destination such as
sudo iptables -t…
![](../../users/profiles/802360.webp)
DevopsinAfrica
- 1
- 1
0
votes
1 answer
Windows Server Destination NAT
I'm unsure of the terminology for this question. Trying to solve a problem, I'm being forced to grow and learn something very new to me! How would I do Destination NAT on Windows Server 2016/2019 for an IP address? Is RRAS part of the solution, and…
![](../../users/profiles/57393.webp)
cwheeler33
- 764
- 2
- 5
- 16
0
votes
0 answers
Redirect output to dynamic IP and change port
I have an application that needs to communication with two external hosts. For various reasons the host has now become a dynamic IP address. Since iptables communications via IP, simply using a straight DNAT won't do. I can change the hostname/IP…
0
votes
2 answers
Forward traffic with iptables without exposing real IP/Port
I want to forward traffic with iptables without showing a different ip/port to sending host.
My application listens on host x.x.15.42, port 23555 using TCP. The client will be connecting to x.x.15.42:5555. I want the connection to be forwarded to…
![](../../users/profiles/583523.webp)
mrmc
- 11
- 3
-1
votes
2 answers
nftables dnat forwarding is not working properly
Good day,
I am currently migrating from iptables to nftables.
The problem is my systemd containers are running behind NAT, but I want to forward ports like 443 or 80 to them.
There is no error message when I use the following set of commands, but…
![](../../users/profiles/455104.webp)
TheGoliath
- 13
- 1
- 4