Questions tagged [dnat]

92 questions
6
votes
1 answer

Proxmox Nat Networking Issue

Definition I have installed Proxmox 3.2 and i am trying to configure a virtual machine as a communication server that handles all traffic and forwards them to the nodes with private ip. I configured server for NAT networking with two CentOS virtual…
efesaid
  • 368
  • 3
  • 5
  • 14
4
votes
1 answer

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 https. Specifically you tube uses some kind of…
JefersonLemos
  • 41
  • 1
  • 2
4
votes
0 answers

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.40:5678 iptables -t nat -A PREROUTING -i eth0 -p tcp…
user2743554
  • 357
  • 3
  • 12
4
votes
1 answer

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 port 9999) to my Linux router. This Linux router use…
kranteg
  • 222
  • 2
  • 11
3
votes
0 answers

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). My issue is that I want to forward specific UDP…
mroek
  • 31
  • 1
3
votes
0 answers

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 all external traffic from a phantomjs node to a set…
MikeSWelch
  • 31
  • 3
3
votes
2 answers

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) -> Proxy Server -> Router -> Internet Requests that…
Cybran
  • 412
  • 2
  • 6
  • 15
3
votes
1 answer

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-destination 10.196.106.230 sudo tcpdump -i wlan0 icmp…
garyF
  • 133
  • 5
3
votes
1 answer

Reply on the same interface as incoming with DNATed IP

A server has 3 ifaces, 2 internal (eth1/2) in different public networks, one external (eth0). There is a service (openvpn) that can't bind to some IPs/ifaces, only to all or one, but I need it to accept connections (UDP) on internal ifaces only. The…
Anatoli
  • 51
  • 1
  • 5
3
votes
3 answers

DNAT from localhost (127.0.0.1)

I'd like to set up a TCP DNAT from 127.0.0.1, port 4242 to 11.22.33.44, port 5353 on Linux 3.x (currently 3.2.52, but I can upgrade if needed). It looks like the simple DNAT rule setup doesn't work, telnet 127.0.0.1 4242 hangs for a minute in Trying…
pts
  • 425
  • 1
  • 5
  • 15
3
votes
2 answers

port forwarding through AWS VPC NAT

Yes, I have already scoured the internet and read most of the popular IPTables / DNAT guides / pages / posts. My Problem Summary I have a VPC with several subnets. One subnet in particular requires an EIP for internet connectivity. I have a web…
3
votes
2 answers

iptables: filter before DNAT

iptables -t filter -A OUTPUT -d 1.2.3.4 -j DROP iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner abc -j DNAT --to 127.0.0.1:121 First rule does not work because nat it processed before filter. Any way to bypass it?
user173616
  • 81
  • 1
  • 4
3
votes
0 answers

iptable DNAT poor performance

I have the following rule for PORT FORWARDING: root@foo:~# iptables -t nat -S -P PREROUTING ACCEPT -P INPUT ACCEPT -P OUTPUT ACCEPT -P POSTROUTING ACCEPT -A PREROUTING -p udp -m udp --dport 1:1024 -j DNAT --to-destination 192.168.100.10 -A…
VP.
  • 403
  • 3
  • 15
2
votes
1 answer

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: Ubuntu 14.04.3 LTS \n \l Linux host…
2
votes
1 answer

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 public. I tried -DNAT: iptables -t nat -A PREROUTING …
Phil
  • 213
  • 2
  • 6
1
2 3 4 5 6 7