In computer networking, Network Address Translation (NAT) is the process of modifying IP address information in IPv4 headers while in transit across a traffic routing device.

learn more… | top users | synonyms

1
vote
0answers
38 views

How to do iptables nat loopback?

I have a linux server behind the ISP's cablemodem-router combo. With some hacking I was able to make the port forwarding work, and the DHCP exceptions in the udhcpd. But I wasn't able to do the NAT ...
3
votes
2answers
2k views

How does iptables MASQUERADE work on the incoming side?

I'm still reading the iptables manual page and other documents and digging around questions and their answers. This is the problem which arises. When we setup the NAT we use a POSTROUTING rule such ...
1
vote
2answers
65 views

How does NAT reflection (NAT loopback) work?

I use the auto generated rules that come from OpenWRT as an example of NAT reflection (NAT loopback). So let's pretend there's a network 192.168.1.0/24 with two hosts (+ router): 192.168.1.100 and ...
1
vote
1answer
225 views

1:1 Stateless NAT kernel version 3.16 or later using TC

I am trying 1:1 stateless NAT traffic. The traffic is coming in via a GRE tunnel and exiting via a VPN. I have done enough research to understand that traffic entering a linux box off of the GRE ...
1
vote
1answer
46 views

iptables DNAT: 'No chain/target/match by that name'

I am trying to use DNAT on a new custom Linux target, but I get an error with the following basic command: #iptables -t nat -A PREROUTING -d 10.110.0.250 -p tcp --dport 9090 -j DNAT --to ...
0
votes
0answers
9 views

Networking, tl-wa5210g boadcast, dhcp. droping packets

Hi i have strange problem IPS is polish UPC and coaxial router This is technicolor with dhcp enabled Addres is 192.168.0.1 As my main gateway It is connected to the router as Ap in wpa2 wich one ...
0
votes
0answers
12 views

ALG IPSEC and RSTP

I have linux 3.18. my Linux is installet on a router. in this router I activate a NAT from the wan side. Does this Linux support ALG of IPSEC and RSTP ?
0
votes
1answer
34 views

Dose iptables NAT overwrite user agent of HTTP headers?

If i use iptables to NAT all HTTP traffic behind another network, does it overwrite user agent of HTTP headers? The rules are as follows: /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j ...
1
vote
1answer
33 views

Answer redirect IP to specific port

I want make a system that has a few subdomains. I set each subdomain to IP address using DNS. I used random IP addresses for the question 165.93.198.34 x.mydomain.com (Which is actually ...
1
vote
1answer
36 views

lxc container <-> external internet, what I missed?

I have Ethernet on my machine (enp0s10) that connected to real network, and I have lxcbr0 Ethernet bridge which gather lxc containers. And I want to make available one of lxc containers. So I wrote: ...
0
votes
1answer
58 views

NAT for second interface on private network

I have the following configured for my two network interfaces. eth1 10.93.90.1 (Production Network) eth0 192.160.0.1 (Private Network/Labb Network) I want to configure eth0 with NAT so I can ...
1
vote
1answer
97 views

IP forwarding through ssh tunnel

The situation involves 3 machines: A. Some laptop connected somewhere to the internet via any mean B. A server connected to the internet through a standard ISP (static IP provided by dyndns: ...
1
vote
0answers
36 views

scp to a KVM guest behind NAT

I have a KVM guest running on a server accessing it via virt-manager. I'm running the guest from my_pc. server has a public IP address and both my_pc and guest can ssh it. guest has a 168.192.x.x IP ...
0
votes
0answers
40 views

iptables Dynamic SNAT, how to force to use different src ip from pool?

Requirement: I need to translate a private-ip range to a public-ip range while going out on the internet. It should be a one-one mapping, if public-ip range exhausts it should drop to the next nat ...
1
vote
1answer
37 views

Configuring iptables for incoming static NAT

I got a router with ssh access to it, iptables are there waiting for me. I am trying to map any connection to port 1337 on both WAN/LAN to my computer's port 1337. How do I do that?
1
vote
1answer
7k views

How to redirect to my squid proxy using iptables since DNAT target: only valid in nat table

I want to redirect the traffic in my lan network through squid proxy but I am having some problems with iptables rules. When I use the following rule: # iptables -I FORWARD -s ...
0
votes
0answers
7 views

Why doesn't iptables show my rule? [duplicate]

I ran the following command to configured NAT: iptables -t nat -A OUTPUT -p all -d 57.5.179.19 -j DNAT --to-destination 127.0.0.1 The rule seems to be working as when I make a request to that IP it ...
0
votes
1answer
96 views

Does “ip_forward” need to be enabled for any iptables SNAT/DNAT (postrouting/prerouting) rules?

I remember I had to enable ip_forward kernel parameter in the past in order to run SNAT/DNAT rules in iptables successfully. Today I was reading this post: ...
12
votes
1answer
10k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
0
votes
0answers
156 views

Changing the port letsencrypt tries to connect on

So, one of my servers is behind NAT, and since there is already a publicly accessible apache server going on my LAN, I decided to access it from the outside with different ports, and remap them to the ...
1
vote
0answers
29 views

Alter DST port on bridged traffic

I need to rewrite the UDP destination port on traffic which is only bridged/L2, but I could not match this traffic via iptables. This traffic isn't going through NAT chains (it could be matched in ...
1
vote
1answer
53 views

1:1 NAT through VM VPN

I've got a few client servers that I connect to with different VPN clients (e.g. Cisco, OpenVPN, etc). I'm trying to set up an Ubuntu 14 VM (with VPN client permanently connected) for each server to ...
1
vote
1answer
202 views

Virtualbox - how to give Internet access and internal network access to two VMs?

I made two Virtualbox virtual machines, CentOS 7 latest iso. I gave them each 2 network interfaces, one NAT and one "Internal network" in order to get them to talk to each other and have Internet ...
0
votes
0answers
31 views

How do I change NAT type for UDP to be more P2P-friendly?

On gateway I do iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE, and on device I have this: $ stun stun.counterpath.net STUN client version 0.96 Primary: Indepndent Mapping, Port Dependent ...
1
vote
1answer
67 views

Linux access point (airmon-ng/airmon-ng) not working

Background: I am trying to set up an access point on Linux. The ultimate aim is to run SSLStrip (for an exercise) so I need to be able to do something like this, to redirect port 80 traffic through ...
0
votes
1answer
149 views

KVM - nat or bridge. How I do that

I have Debian Jessie server, and I have install apache server. From apache hosted several sites from different ip address. My server have resources for KVM. My question is - How I can set my free IP ...
1
vote
1answer
43 views

Access 2 VM's with one IPv4

I have two Virtual Machines. The 1st VM is running Debian 8.2 and the 2nd one is running Ubuntu Server 14.04.2 LTS Also I have one Public IPv4 The IPv4 assigns in only one server at a time. I assume ...
1
vote
1answer
69 views

iptables DNAT+SNAT: unwanted multiplication of the same udp datagram (and malfunction)

trying to figure out my mistake in the following very simple scenario: |peerA|(Aip:Aport) <--> (Bdev:Bip:Bport)|NatNode|(Cdev:Cip:Cport) <--> (Dip:Dport)| peerD (peer A emits datagrams ...
0
votes
0answers
63 views

linux to linux IP MASQUERADING failed (can't ping ip server)

I'm new in linux, i'm trying to IP MASQ. So the diagram is like linux A is connected to HUB and Internet, and linux B is connected only to HUB. In linux A i have eth1 (10.10.10.5) and eth0 ...
3
votes
1answer
68 views

“ssh -L <port>” only working from local machine

I mean if I've got something like this: ssh -L 9000:itc.ua:80 andy@localhost It will open port 9000 on my local machine and when I hit http://localhost:9000 in Firefox it will forward to itc.ua:80 ...
1
vote
0answers
27 views

Forward public network around current network

For the purposes of this discussion, I have a very current always-on linux machine with two nics: wifi0 eth0 A very crude diagram of my desired configuration looks like this: ...
0
votes
1answer
2k views

Routing internet on NAT server thru Squid proxy

I've configured a Squid proxy and a NAT instance and both are functioning fine. Now I want to configure a proxy server on the NAT instance so that the internet on NAT is routed through the Squid ...
1
vote
2answers
571 views

FTP Troubleshooting

I have a centos 6.5 installed on Virtual Box. I'm trying to configure a basic ftp server. Below are details of it. Installed vsftpd from DVD/Yum: Status -> Successful Disabled firewall for test ...
1
vote
1answer
1k views

GlusterFS how to failover (smartly) if a mounted Server is failed?

In GlusterFS, lets say i have 2 Nodes (Servers) on a Volume. Lets say the volume info is something like this: Volume Name: volume-www Brick1: gluster-server-01:/volume-www/brick Brick2: ...
6
votes
1answer
172 views

Why doesn't NAT reserve ports from the machine's TCP and UDP port pool?

I made two experiments. This is the network for both of them: [private network] [public network] A -------------------- R ----------------- B 192.168.0.5 192.168.0.1|192.0.2.1 ...
1
vote
1answer
199 views

ssh connection refused from same PC when going outside local network

I have sshd running on port 8000 running on a freshly installed plain vanilla Linux Mint 17.2 Rafaela. $ sudo netstat -tnlp | grep :8000 tcp 0 0 0.0.0.0:8000 0.0.0.0:* ...
2
votes
1answer
250 views

Rewrite source IP in TCP replies using iptables

I'd like to rewrite the source IP on TCP/514 traffic leaving a redhat machine, for connections that weren't initiated from the machine. The machine receives TCP/514 traffic on an interface, for ...
0
votes
0answers
230 views

Host a server with NGINX using VPN behind a NAT

so I was hosting a server using NGINX on a Raspberry Pi using a T-Mobile mobile router. All was working fine, till I noticed today that T-Mobile started to put me behind a NAT sometimes. So I heard ...
0
votes
1answer
2k views

AWS VPC NAT | ssh_exchange_identification: read: Connection reset by peer [closed]

I had a tough misleading error while connecting in AWS VPC subnets. The error did occur in B->A connection, and did not happen while A->B, so at the beginning I thought that it is library bug. It ...
1
vote
1answer
226 views

How check a port forwarded from localhost to localhost on.. localhost?

I'm learning about iptables, firewalling, routing and so on. I'm on Linux, Centos7, and I've set up a local port forwarding to localhost with: firewall-cmd ...
2
votes
1answer
569 views

NAT box with multiple internal and external interfaces

Similar questions have been asked before but my setup is a little different and the solutions to those questions are not working. A have a CentOS 6 server running iptables with 5 interfaces: eth0: ...
4
votes
1answer
497 views

How to configure QoS per IP basis?

We have say 4 users in a private network connected to the Internet trough a Linux router with a public IP address that is doing network address translation (NAT). I gotta configure QoS to give access ...
2
votes
1answer
619 views

iptables Port Forwarding — no service with the port

I have setup a network as in the image below: Firewall (FW) running CentOS 6 has two physical interfaces with subinterfaces: eth0:2 — 10.100.1.78/25 eth0:3 — 10.100.1.79/25 eth3 — 192.168.0.21/24 ...
0
votes
0answers
111 views

Why is my laptop being blocked from connecting to a PPTP VPN server?

I have a fairly simple network at home Internet --> Modem --> Linux Router --> Switch --> Laptop The problem: There is a PPTP VPN server at work that I need to connect to from home. I configured my ...
0
votes
0answers
701 views

strongSwan routing issue with roadwarrior behind NAT

Using the following ipsec.conf configuration: conn %default ikelifetime=60m keylife=20m keyingtries=3 rekeymargin=3m keyexchange=ikev2 ...
0
votes
0answers
200 views

SSH Public key fails when using Reverse SSH Shell

I have a machine behind a NAT, which I would like to access via ssh. Lets call this machine A. I have machine B, which is publicly reachable, which I would like to route my ssh connections. I have ...
1
vote
1answer
1k views

Randomize external port when doing NAT with iptables

I want to configure a NAT behavior different from the default one implemented by iptables. In this example: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:2000-400 The ...
4
votes
2answers
676 views

Send traffic to self over physical network on Ubuntu

I have a dual port ethernet NIC and let's say I have connected both ports in a loop and assigned the following IPs to the 2 ethernet interfaces: eth2 -> 192.168.2.1 eth3 -> 192.168.3.1 I want to ...
1
vote
0answers
147 views

Can not reach local DNS server for local dot domain subzones because firewall returns gateway IP

I have pfSense inline between my cable modem and my switch, on pfSense I have a NAT port forward on 53 to my local DNS server which I want to serve local subzones to the LAN with. Right now when I dig ...
1
vote
1answer
126 views

linux nat different rules

eth0 (192.168.1.0/24) --> wan eth2 (192.168.10.0/24) --> lan0 I use these rules to enable NAT on my linux gateway: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i ...