Questions tagged [dnat]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
2answers
151 views

Nftables - how not to dnat an ip on interface (DNS)

I have been searching, but cannot seem to find an answer to my specific issue. I have the following rule today under prerouting: iifname "br0" udp dport 53 counter dnat to 192.168.22.5:53 However, I ...
0
votes
0answers
34 views

Nat a multicast address between two NICS of a linux box both on different subnets

I am using Linux centOS as a router to NAT traffic between two subnets. I can route/nat unicast packets with no problem using iptables. For simplicity sake lets say I have computer A (192.168.0.1) ...
0
votes
2answers
147 views

fail2ban action to route to another ip

I want to create a fail2ban action which routes the traffic to another IP on ban action, and removes the route on unban action. File: iptables-route.conf in /etc/fail2ban/action.d/ # Fail2Ban ...
0
votes
1answer
55 views

How can I limit data download with PREROUTING on iptables?

I have 2 servers, called A and B. All (tcp/udp) traffic will be redirected (via SNAT) from A to B (except SSH). The clients will be connected to A. However, the response will return from B. This is ...
0
votes
1answer
31 views

DNAT locally generated packets sent to local WAN address

I have an (OpenWRT-powered) router with a port forwarding (DNAT) rule that forwards incoming HTTP requests to a dedicated server box inside my LAN. Here's the relevant configuration bits. Addresses: ...
0
votes
0answers
30 views

Request Time Out / Sessions Stalling through IPTABLE (DNAT)

Scenario: Customer recently Migrated Clustered HANA DB Servers to Azure Cloud Platform but these are Physical Servers on Azure (Offering: Azure HLI). Usually these HLIs (HANA DB Servers) in Azure ...
0
votes
1answer
34 views

DNAT redirection works but returns with the redirect IP

I'm doing a test that my clients, network 10.101.29.0/24, when try to connect to 192.168.100.100 been redirected to 10.10.10.222. This part is working, but my problem is on the answer. The answers is ...
1
vote
1answer
82 views

Strange behaviour on iptable with nat AND port forwarding

I have several dedicated servers hosted in several datacenters, and I want to migrate mail (pop3, imap, smtp and their TLS/SSL variants) services from one server to another. For that purpose, I ...
0
votes
1answer
286 views

DNAT using iptables only works for traffic incoming on eth0

I have a machine with two interfaces that have different routeable IPv4 addresses. To return traffic on the right interface, I used this answer and comment, and it works: I can ssh into the machine ...
0
votes
2answers
144 views

DNAT without default route

I have a TCP service in a datacenter that is doing filtering and rate limiting based on source IP address. I'd like to move it to another datacenter. I'd like to provide the same service on an IP ...
0
votes
0answers
83 views

Redirect traffic from one IP adress to another

I am moving a server from one local IP address to another, and I have a lot of places on my network which statically reference the old IP address. I'd like to re-route that traffic to the new address, ...
1
vote
1answer
68 views

Need correct iptable rules for NAT instance to prevent loop back for private subnet EC2 instance outgoing traffic

My AWS architecture has a public subnet having a NAT instance. It forwards the traffic on certain ports to my EC2 instance hosted in a separate private subnet. sudo iptables -t nat -A PREROUTING -...
0
votes
1answer
46 views

Port 80 mixed up among clients using DNAT

I'm trying to set up a network like this: ...but I'm facing an issue. Here's the point: If I try to reach (e.g.) mywebsite1.com from external it works like a charm and it's shown my wonderful ...
0
votes
1answer
199 views

Can I access my VMware workstation intranet VMs through a public IP address

I have a Windows Server with a public IP address (102.1.1.1) and I've installed VMware workstation on it, creating several VMs on it. The VMs use intranet IP addresses, such as 10.0.0.1, 10.0.0.2. ...
0
votes
0answers
1k views

How-to DNAT-forward all IP traffic on Windows 10 from IP1 to IP2?

On my local machine, I want to setup a (web-)server that receives data that is sent (via http/https) to IP 65.55.44.109 (vortex.data.micorosoft.com). In order to do that, I need to forward all IP ...
2
votes
1answer
143 views

KVM guest can't connect to itself after DNAT

Network Description Virtual hosting environment (KVM): Guest: Ubuntu 14.04.5 LTS \n \l Linux ari 3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 i686 i686 i686 GNU/Linux Host:...
1
vote
0answers
281 views

Draytek Vigor2926ac Port Redirection across WANs

I have a DrayTek 2926ac router which has an Ethernet feed as it's primary WAN and a 4G router (factory default settings + APN) as the Failover WAN. When I disable the primary WAN, the failover WAN ...
0
votes
1answer
666 views

(dnat|redirect) with masquerade doesn't work

I have a problem, till a bit ago it was working just fine. but now, it doesn't work, but on another testing server it works just fine I force all traffic to tor, and this part works just fine. ...
-2
votes
2answers
3k views

nftables dnat forwarding doesn't work properly [closed]

Greetz, I ran into a problem this morning. I'm currently migrating over from iptables to nftables. My problem is, that I'm running my containers behind nat and I want to forward my ports (e.g. 443, 80)...
0
votes
0answers
73 views

Infos about iptables DNAT/REDIRECT to local

I'm using Qubes OS, a system based on the Xen microkernel, which let you run easily multiple Virtual Machines and compartmentalize your digital life. All the domains are connected by default (through ...
1
vote
1answer
524 views

IPTables -j DNAT doesn't appear to work in a certain case

I am trying to change the destination IP address for an ICMP reply packet. The ICMP reply enters the router from my IPSEC tunnel as such (I'm not entirely certain why it is shown in tcpdump twice): ...
4
votes
1answer
2k views

Mikrotik - redirecting YouTube to a local friendly page

I'm configuring a rb750. I would like to drop YouTube access and redirect to a friendly page located in our local webserver. I can drop using l7 firewall but I'm not able to redirect user because ...
1
vote
2answers
232 views

IPTables DNAT WAN interface to hosted VM fails but DNAT to WAN IP succeeds

Thank you all in advanced! So here is the situation: 1. domain0 has two NICs (LAN=enp1s0f0, WAN=enp1s0f1) 2. vm0 of domain0 has IP=10.4.4.10 3. ip_forward=1 AND all interfaces forwarding=1 4. ...
0
votes
2answers
2k views

How to DNAT Broadcast Packets

I am working on a project where I have to DNAT some broadcast packets to a remote machine IP Address. So far I have learnt that IP-tables can only DNAT unicast packets and it does not DNAT broadcast ...
0
votes
1answer
82 views

Redirection (ip nat static) with filtering

I want to apply a D-NAT on my Cisco router to access my management IPBX server via the Internet and I have successfully done it with this command: (config)# ip nat inside source static tcp 10.1.1....
2
votes
0answers
324 views

Getting NATed traffic returned back to the right interface

On a custom board (running a 4.x kernel), I have two physical ethernet interfaces and one radio modem that gives me a ppp-interface. iproute2 has been installed, and I am using nftables (not iptables)....
0
votes
0answers
442 views

Port forward port 25 on a Firehol instance

I am trying to port forward through a Firehol box to my email server on port 25: clienta:25 > firehol > email:25 This is a non-transparent connection. The command I am trying is: nat4 to-...
1
vote
1answer
58 views

multiple ip dnat with firewall

i am having a vmware install running multiple VMs i would like 1 of them as a router/firewall where all external IPs are connected to and running different services on the other VMs like apache ftp ...
3
votes
0answers
535 views

IPTables DNAT Exemption

TL;DR - I'm looking for a way to send all my external traffic through a proxy server but not send all my internal traffic through a proxy server. How can I achieve this? My end goal is to forward ...
1
vote
1answer
191 views

DNAT for connecting a subnet via proxy to the internet

DNAT for connecting a subnet via proxy to the internet I want to connect a server in a subnet to the internet via a proxy-server. But I can’t ping a host on the internet (www). Actually the subnet-...
0
votes
0answers
762 views

Prerouting with iptables, destination port to DHCP ip

I have an iptables rule that translates requests to the same IP from different internal hosts by changing the source port. iptables -t NAT -A POSTROUTING -p TCP -d 173.32.1.2 --dport 873 \ -m state --...
0
votes
1answer
60 views

policy routing to guests on other server

After long searching I've found the answer to my challenge, but the last step fails. I have two identical servers that both serve multiple guests. The servers have two interfaces: one for the ...
1
vote
1answer
776 views

Forwarding ports from one bridged interface to a guest container on host OS

I have a simple configuration. Mind map how everything look like So I have a structure: Proxmox Host OS (vmbr0, vmbr1) Container 1 (eth0) Container 2 (eth0) The Proxmox networks: vmbr0 Link ...
0
votes
2answers
193 views

port rerouting with iptables not working

I want to reroute all traffic from a port e.g. 4445 (from localhost) to another port on another machine in the LAN e.g. 3305. I expected this should do the deal: iptables -A PREROUTING -t nat -i eth0 ...
4
votes
0answers
745 views

iptables/nat/prerouting ignores UDP packets?

The same effect on many servers with various kernel versions. There are multiple Iptables DNAT rules: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 12345 -j DNAT --to-destination 10.20.30....
1
vote
1answer
239 views

Iptables DNAT single port

I'm trying to redirect a single port to a local server via IPtables. Currently I have the following rules: iptables -t nat -A PREROUTING -p tcp -m tcp --dport 55555 -j DNAT --to-destination 10.188....
3
votes
2answers
4k views

Squid 3.5: Preventing forwarding loop in intercept mode

I have set up a router and an intercepting HTTP squid proxy on different machines. Clients should use the proxy (without knowledge) in the following way: Client -> Router (DNATing to proxy server) -> ...
1
vote
2answers
690 views

iptables DNAT broadcast address

I'm having trouble using iptables to change the destination address of a broadcast packet. I have read several places that iptables/Linux won't forward broadcast packets, so I'm looking for ...
3
votes
1answer
665 views

iptables nat table is not changing destination IP in PREROUTING?

OK, so on a vanilla Ubuntu 14.04.2 install, i run the following commands: sudo bash -c 'echo 1 > "/proc/sys/net/ipv4/ip_forward"' sudo iptables -t nat -A PREROUTING -d 192.168.100.1 -j DNAT --to-...
1
vote
2answers
347 views

UDP packet comes to VPN interface and is not delivered to the process

I have a server X (45.55.245.182) which is connected to server Y by VPN. VPN interface on X is tap0 with ip 10.200.0.2; VPN interface on Y is tap0 with ip 10.200.0.1. I run netcat on server Y to ...
0
votes
1answer
423 views

iptables DNAT to external IP without masquerading does not work

On server 1.1.1.1: iptables -t nat -A PREROUTING -p tcp --dport 20000 -j DNAT --to-destination: 2.2.2.2:20000 iptables -t nat -A PREROUTING -p tcp --dport 20000 -j LOG --log-prefix pre20k iptables -...
0
votes
1answer
398 views

Why does iptables not doing DNAT for the same subnet? [duplicate]

I have the following NAT setup: +--------------+ +-----------------------+ +-------------------+ | | | | | | | | ...
0
votes
1answer
2k views

Original IP lost with IPTables NAT to another server

I'm trying to forward all HTTP traffic from one EC2 linux server (external IP 11.11.11.11) to another one (external IP 22.22.22.22), these rules set: sudo iptables -t nat -A PREROUTING -p tcp --dport ...
-1
votes
1answer
100 views

Iptables DNAT working in my own network, but not through VPN

For some reasons I need to switch a server ip to another ip, in order to be seen by another computer elsewhere through vpn. So I'm using iptables (didn't know any of that until yesterday) and testing ...
0
votes
1answer
69 views

NAT forwarding (whole IP) working only on some ports

Since my hoster doesn't allow briged setups I had to go for a NAT solution to run my CentOS VM on an additional IP and my host machine on the primary IP. Now, I've got a problem since for ports 22, ...
0
votes
2answers
953 views

rewrite destination IP of TEEed traffic

Server 1 and Server 2 (Centos 7) both host the same application, which listens on UDP port 1514. Server 1 receives traffic on this port. The goal is for the application on Server 2 to receive a copy ...
1
vote
0answers
380 views

iptables foward to multiple interfaces with NAT

I want to use iptables for provide NAT translation and forward the packets out a different interface. The network set-up is as follows: Alias: eth0:220 with IP address 10.1.1.220 / 255.255.252.0 ...
-1
votes
1answer
139 views

How do hosting providers give each container a unique public IP? [closed]

I'm looking in to starting my own hosting company; even if I'm only paid in experience. At first, I thought I'd create shell scripts to automate the creation of OpenVZ containers. But then I ...
1
vote
1answer
1k views

Using host's iptables to prevent access to docker-container's exposed ports

I have a host which runs a few docker's containers. This host has a few network interfaces, my goal is make some exposed ports from containers accessible only by certain interfaces, and prevent ...
0
votes
0answers
743 views

iptables DNAT packets into an openswan IPSEC tunnel

I have the following network setup: +-----------------------------------+ | | +-------...