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

0
votes
1answer
23 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: ...
1
vote
0answers
22 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
28 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
29 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
60 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
17 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 ...
2
votes
0answers
58 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 ...
2
votes
1answer
46 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
45 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
40 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 ...
0
votes
0answers
35 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 ...
1
vote
1answer
43 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 ...
3
votes
1answer
40 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
25 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: ...
1
vote
2answers
360 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
137 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:* ...
6
votes
1answer
122 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 ...
2
votes
1answer
176 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
173 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
1k 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
493 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: ...
1
vote
1answer
136 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
284 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
301 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 ...
0
votes
0answers
93 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 ...
1
vote
0answers
90 views

Remote SSH into raspberry pi [closed]

I wanna setup Open VPN on my Pi, but first I wanted to check whether I can setup my modem and router (DD-WRT ; linux-based firmware) to port forward to my Pi and test SSH to it in the first place. So ...
0
votes
0answers
480 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
156 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
0answers
127 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
103 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 ...
0
votes
0answers
498 views

CentOS as home network router: IPTables Port Forwarding failure

I have currently set up a home server with a CentOS 6.6 installation on it. The server has two NIC interfaces which I'm using it as my router and DHCP server. Here's a diagram showing the network ...
1
vote
1answer
151 views

Does NAT allow accessing internal network (or router's local interface) from outisde by default?

I am using older SOHO router wl500gP (it is v1 but I think this is not important) with custom Oleg firmware. My topology looks like this: 192.168.3.3 192.168.3.2 NAT 192.168.2.1 ...
1
vote
1answer
218 views

How to enable ping between machines connected in two interfaces?

I have a linux board with two ethernet interfaces as mentioned below. eth0 connected to another linux machine (ad-hoc) eth0 on board 191.168.1.2 connected to Linux machine 192.168.1.3 eth1 on board ...
0
votes
2answers
2k views

Enable ssh host to guest & guest Internet on CentOS 7 guest with VirtualBox

I have 2 CentOS 7 guests running in VirtualBox on a Ubuntu host. I want to be able to: Connect using ssh from host to guest Download/install packages from the Internet on the guest. I currently ...
1
vote
0answers
46 views

Shorewall configuration : providers and LAN

Hi all and thanks in advance for the answers. Currently, I have different providers configured in shorewall. I'll will probably have to change one of them. The problem is I won't have any Public IP ...
0
votes
0answers
513 views

iptables - hairpin NAT dual WAN

Here is my lab Client LAN: 192.168.150.95 Gateway: 192.168.150.1 RDP Server LAN: 192.168.150.2 Gateway: 192.168.150.1 Linux Router WAN: 177.129.XXX.XXX Gateway: 177.129.XXX.XXX LAN: 192.168.150.1 ...
0
votes
1answer
54 views

Nat with saving real client IP

I have this schema: Client -> NAT server -> Game server On NAT server I have the following rules: iptables -A FORWARD -d $MC_IP -p tcp --dport 25550:25580 -j ACCEPT iptables -t nat -A PREROUTING -d ...
1
vote
1answer
96 views

Need help selecting networking option in VMware workstation

I am a complete noob in this area, so I really need help and advice. I am trying to setup something like a VPS on my computer. What I will do is: 1) Install vmware workstation on my computer 2) ...
1
vote
1answer
351 views

NAT External IP to local server using iptables

I have a adsl connection with static IP (lets say 1.1.1.1). My debian firewall connects Internet with ppp and IP is assigned to firewall directly; ppp0 Link encap:Point-to-Point Protocol inet ...
1
vote
0answers
64 views

Outgoing masquerade address changes after adding a second interface to the bridge

In fact I have the following configuration: extrouter(192.168.1.1) <- wifi -> [eth2 (192.168.1.11) Centos 6/6 based host br0 (172.22.5.254)] br0 contains two tap interfaces (tap0/172.22.5.1 ...
0
votes
1answer
120 views

SSH to a virtual machine

I recently installed a Linux (Mint 17) virtual Machine on a Windows 7 PC. In order to be able to SSH to this virtual machine, I had to define a few rules and redirect ports as explained in other posts ...
1
vote
1answer
112 views

Redirect traffic destined for IP and port

I have a program that wants to connect to 1.2.3.4 on port 5678, but it can't because the port is blocked on our network. However, I do have an SSH tunnel set up that redirects localhost:5678 to ...
3
votes
1answer
110 views

How to create an internal multipath gateway

Basically trying to bend bridging and NATing to my will with quite a unique project. I've simplified what I'm doing below (VM=Kali virtual machine for testing): ZoneX's are network namespaces, ...
2
votes
0answers
38 views

guest owns NIC, host and other guests access via NAT

OK, this is a bit complicated. On my host OS, when Guest1 is running, I want any incoming connections to go to guest1. So from the outside the system looks like guest1. But I still need to access ...
1
vote
1answer
129 views

Observing ping replies under DNAT

I'm confused while trying to understand the DNAT mechanism under below circumstance. My understanding: DNAT = Destination Network Address Translation: Functionality which translates the destination ...
2
votes
1answer
69 views

(S/D)NAT over NF hooks

Could someone help on explaining the advantage of iptables NAT over the netfilter hooks. Say suppose, instead of using NAT if we create custom kernel module to bind handler with netfilter for PRE/POST ...
0
votes
0answers
465 views

Slackware internet gateway with iptables / poor browsing performance

I am running a dual core headless computer as internet gateway via pppoe with two NICs. eth1 (internet interface) no ip, no dhcp eth0 (LAN interface) - 192.168.0.100 static ppp0 - dynamic ip ...
1
vote
0answers
157 views

Use VirtualBox to access site on host from guest? the host and guest is linux

I'm running VirtualBox on a Ubuntu (host), the VM I’m using is fedora (guest). VirtualBox is setup to use the NAT network adapter, and I'm able to get to the internet. I use Port Forwarding to access ...
0
votes
1answer
49 views

Understanding NAT concepts

I began learning networking on Linux, and I am looking for a way to associate a particular IP to a particular MAC address (i.e. a way to edit the NAT table?). Actually I am trying to assign some IPs ...
1
vote
1answer
67 views

Network translation, one to one, not one to many

Desired scenario: a small subnetwork of Linux machines, all accessible through another Linux machine (acting as an IP router). These machines would be pre-configured with addresses on a private ...