Questions tagged [dnat]

The tag has no usage guidance.

0
votes
1answer
29 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
56 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
42 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
81 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
58 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, ...
0
votes
1answer
31 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
40 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
60 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
659 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
106 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
127 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
424 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
893 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
50 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
302 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): ...
3
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
167 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
1k 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
66 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....
1
vote
0answers
187 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
369 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
50 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
316 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
125 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
550 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
58 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
584 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
140 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
562 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
146 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
3k 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
520 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
516 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
255 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
266 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
289 views

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

I have the following NAT setup: +--------------+ +-----------------------+ +-------------------+ | | | | | | | | ...
0
votes
1answer
1k 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
81 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
68 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
1answer
748 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
228 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
125 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
687 views

iptables DNAT packets into an openswan IPSEC tunnel

I have the following network setup: +-----------------------------------+ | | +-------...
3
votes
1answer
6k views

Why some iptables DNAT rules don't work until reboot?

My iptables DNAT rules don't work until reboot. If I reboot my server, all of the rules work. Desciption of the architecture : Tens of hosts (senders) send some UDP packets (one-way on a specific ...
0
votes
1answer
560 views

DNAT in Shorewall not working for VPN

I have a firewall (10.8.0.1) connected to an internal server (10.8.0.2) via VPN. On the firewall the VPN interface is called tun0. So in my shorewall configuration I have this: $ cat interfaces #ZONE ...
2
votes
1answer
1k views

Port redirection with iptables to localhost / blocking the destination port

I like to forward all traffic coming to 80 to be redirected to 8000. I used iptables -tnat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8000 But then port 8000 is still open to ...
0
votes
1answer
291 views

iptables: DNAT configuration FTP service

Hi have a FTP server behind a firewall and have problemi with DNAT configuration, internal server have ip 192.168.4.110: iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT ...
1
vote
1answer
148 views

iptables dnat mapping to specific ip

I constructed a private net with two machine, both of them have two network interfaces this is the networking information: machine1: eth0 10.0.0.11 (private net) eth1 10.82.80.208 (Campus Network ip)...
0
votes
2answers
3k views

Port forward with iptables

I got lo (127.0.0.1) and eth0 (172.17.0.8). I want to redirect packets that land on 127.0.0.1:80 to 172.17.42.1:80 (route from eth0). I tried iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.1 ...