Questions tagged [forwarding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
196
votes
2answers
122k views

What's ssh port forwarding and what's the difference between ssh local and remote port forwarding [duplicate]

I feel confused about ssh port forwarding and the difference between ssh local and remote port forwarding. Could you please explain them in detail and with examples? Thanks!
12
votes
2answers
1k views

Linux iptables ssh port forwarding (martian rejection)

I have a Linux gateway performing NAT for my home network. I have another network which I'd like to transparently forward packets to, but only to/from specific IP/ports (ie. not a VPN). Here's some ...
8
votes
2answers
40k views

iptables forward traffic to vpn tunnel if open

I've used the following guide to set up my raspberry pi as an access point: Raspberry Pi 3 as wifi access point I'm forwarding wlan0 to eth0 and NATing all my traffic. Works great! sudo iptables -t ...
6
votes
1answer
2k views

Postfix configuration - keep the envelops

I have a postfix server that delivers mail and send a copy of the outgoing mail to a second server for content analysis using the following configuration (addresses and IPs have been replaced): main....
5
votes
1answer
13k views

Is net.ipv6.conf.all.forwarding=1 equivalent to enabling forwarding for all individual interfaces?

or it is the only way to enable forwarding for IPv6? /proc/sys/net/ipv6/conf# grep '' */forwarding all/forwarding:0 default/forwarding:1 eth0/forwarding:1 lo/forwarding:1 nat64/forwarding:1 tunl0/...
5
votes
1answer
7k views

Limiting IP forwarding between certain interfaces/networks

I currently have ipv4.ip_forward enabled to route packets between multiple interfaces. I am now scaling up the system to 8 interfaces, but I want to limit the routing between interfaces/addresses. ...
5
votes
1answer
1k views

unable to connect to forwarded port over ssh

I have two servers. Server 1 has access to an Oracle instance on a server I have permission to hit but not login to via SSH. I would like to use SSH port forwarding to connect from server 2 to server ...
5
votes
1answer
6k views

IPTABLES: process a packet locally and send a copy to another host

I have a trouble configuring iptables to do this: some clients send messages to a server. I want that the host server processes the messages locally (host A, as normal) but that additionally for each ...
4
votes
1answer
1k views

What is kernel ip forwarding? related question

This question is related to the answer & comment in What is kernel ip forwarding? from @LawrenceC post1: So in the above example, if you have an internet connection on NIC 2, you'd set NIC ...
4
votes
3answers
2k views

X11 forwarding through SSH

I have been playing around with X11 forwarding the past few hours and so far I've managed to forward my desktop pc's X Server to my laptop, using X11VNC as server and X2VNC as client. X2VNC uses ...
3
votes
3answers
3k views

forwarding web traffic through a vps running on Ubuntu in another country

I've got a vps in another country. And I'd like to forward all my web traffic through it. I know there are commercial options available in the market but I'd like to do it by myself for the sake of ...
3
votes
1answer
6k views

Pass a value for an input prompt

I do unzip my.zip and if files already exists it asks replace myfile.ext [y]es, [n]o, [A]ll, [N]one, [r]ename: How can I force input for when the command prompts for input? I am aware unzip may have ...
3
votes
2answers
10k views

Port forward- Why is iptables with POSTROUTING rule required?

Supposing I have two servers: -->Server A has the IP XXX.XXX.XXX.XXX -->Server B has the IP YYY.YYY.YYY.YYY What I want is to redirect trafic from server A (port 80) to server B (port 80). A ...
3
votes
1answer
4k views

TCP forwarding over SSH using non-root account

I've setup TCP forwarding over SSH using the following command: ssh -N -L 1234:10.0.2.2:1234 root@10.0.2.1 This works no problem. So I decided to create a non-root account user1 on 10.0.2.1 to do ...
3
votes
1answer
2k views

How do I fix the to address when forwarding with mail/exim?

I am using Debian Squeeze (I believe, the box doesn't really say) I config exim4 to use Gmail and put root: someuser in /etc/aliases then put my email address (name+box@gmail.com) in .forward. I ...
3
votes
1answer
1k views

Exim4 forwarding all emails of domain type to a specific email address

Recently I switched from shared web hosting to DigitalOcean VPS where I have Debian GNU/Linux 8 (jessie) running. In the web hosting I had the option to forward all emails (*@domain.com -- anything as ...
3
votes
1answer
580 views

Is there any way to forward mail from the command line in Linux

I'm looking at the mail command which fires off Heirloom Mail. My procmail failed and it has 55 messages in the queue. I need to forward them out to another email and then process them manually. I'm ...
3
votes
1answer
3k 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: myserver....
3
votes
0answers
204 views

Can I use iptables to forward between interfaces without setting /proc/sys/net/ipv4/ip_forward?

Can I use iptables to forward between interfaces without setting /proc/sys/net/ipv4/ip_forward? I want a secure default of not forwarding anything and then specifying exactly what should be forwarded....
3
votes
0answers
253 views

SSH - Unable to access local forward from another host

I have a VPS with 2 public IPs (assume 192.168.0.1 and 192.168.0.2) I am trying to do a local tunnel to my router on my VPS bound to the second IP, and then access it via another machine. I do the ...
3
votes
1answer
616 views

How to forward libnotify to growl

I'm looking for a simple solution to forward libnotify notifications (from knotify4) to a remote growl servers (running on Windows and Android). So far I'm only able to send remote growl ...
2
votes
3answers
5k views

SSH Agent-Forwarding works, but what about sudo -u username no shell/ permissions? composer

Working on a remote server (A) I want to use my local SSH-Keys to access a repository on another server (B) that is not controlled by me. Generally this works like a charm. I log in as myUsername ...
2
votes
1answer
571 views

possible spots to configure BIND-DNS forwarders

i'm investigating our BIND's configuration and can not figure out how it is aware of it's next name server to ask for some domain he's not authorative server for... e.g. home domain is 'workgroup.lan'...
2
votes
1answer
436 views

Masquerade rule with netfilter-persistent

I use netfilter-persistent to manage a firewall. I would like to share a connection between two interfaces using masquerading (example, or another). When I run those operations by invoking iptables ...
2
votes
1answer
10k views

Strongswan forwarding traffic between two IPsec tunnels

Given a remote (centralized) VPN server with a StrongSwan IKEv2 setup with external static IP: centralized server internal IP 192.168.1.65, network 192.168.1.64/27 And two gateways doing NAT for ...
2
votes
3answers
2k views

Enabling IP forwarding at kernel compile time

I am compiling a kernel for a router. I know a way to enable IP forwarding in an existing Linux system. At compile time, CONFIG_IP_FORWARD is said to do the same task. I am configuring version 3.12....
2
votes
1answer
318 views

How to share “internet hotspot” access to a network on a second wifi adapter?

Can anyone assist with a linux routing question? Essentially I want to use an Ubuntu laptop to provide internet access to an attached network. I have a Raspberry pi on a wifi network (192.168.42.0/24)...
2
votes
1answer
661 views

Transparent proxying of TCP connections on port (mostly, without root access)

I have the Client machine living somewhere on the Internet, and it needs to access a custom port of Target machine (or, initially any port on any reachable machine, but, eventually, particular port, ...
2
votes
2answers
216 views

iptables ignores other rules after add last rule

I have written these rules in iptables: -A FORWARD -i eth1 -o eth0 -p icmp -m limit --limit 1/hour --limit-burst 5000 -j ACCEPT -A FORWARD -i eth1 -o eth0 -p udp -m limit --limit 1/hour --limit-burst ...
2
votes
2answers
2k views

How can I use procmail to modify the body of an email and then forward it to an external address?

I'm struggling to get procmail to first transform, and then forward, a received email. Here's what I'd like to do: :0 f | ~/bin/encryptemail.pl | mail foobar@gmail.com That is, I want to run the ...
2
votes
1answer
3k views

Can't forward traffic from eth to TUN/TAP

I'm trying to forward traffic from a physical interface enp5s0 to a virtual one tun0. The goal is to make tun0 receive essentially all packets from enp5s0. First, I enable forwarding with a command ...
2
votes
2answers
3k views

How can I forward emails from a POP3 account to another SMTP or IMAP account?

I have an email address that I can access via POP3, but which I rarely use. Though it receives quite a bit of email. I cannot use a forwarding feature for this account. Yet I want to forward ...
2
votes
1answer
640 views

Configure courier to forward certain mails to external addresses

I have a debian 6.0 server with courier/courier-mta set up and some local domains. Now I want to create some forwards for some email address that should go directly to external addresses as there are ...
2
votes
1answer
21 views

Simple audio forewarding scheme

laptop(1) - wifi router(2) - wifi enabled PC(3) - speakers(4) (1) is a portable laptop, running some graphical interface. It has ssh access to (3) set up. (3) is an old machine, and thus running ...
2
votes
0answers
732 views

Internet access in LXC container with nftables

I'm currently trying to give an LXC container internet access using nftables, but I don't seem to get it right whatsoever. The setup is the following: The host has a WAN interface (enp1s0) and a ...
2
votes
0answers
124 views

Why response packets are not forwarded between interfaces?

I have the following situation on my host: veth5 10.0.0.3 o | ----------------- ...
2
votes
0answers
302 views

Redirection of traffic from one computer to another

I have two computers on the same lan Comp A: 192.1681.151.15 Comp B: 192.1681.151.19 When I open Wireshark, for all traffic browsed on comp A, I would like Wireshark to capture traffic of comp A and ...
2
votes
1answer
195 views

Port forwarding for VirtualBox + Tor

I am a little confused, maybe someone can help me. I have configuration like: Router [External IP: 91.111.91.111] -> PC [Nat IP: 192.168.1.20] -> Virtual Machine as a Gateway (Whonix - Tor) [Nat IP ...
2
votes
0answers
307 views

Redirect traffic to specific website

I am trying to setup something like a captive Portal but get stuck. I have an embedded device which starts a Wireless Access Point. Now I like to forward all traffic to a website on the device. I do ...
2
votes
1answer
599 views

Packets not forwarded due to second routing table

I've just spent about an hour trying to understand why my docker containers couldn't connect to the internet, in particular couldn't resolve any DNS names. By now I've found a workaround, but I still ...
2
votes
0answers
1k views

KVM guest as default gateway for bridged network

I currently have two vm's both on kvm (virt-manager), both running on separate virtual interfaces (virbr0 and virbr1). The IP of virbr0 is 192.168.122.0; the IP of virbr1 is 192.168.123.0. Both VMs ...
2
votes
1answer
35 views

Is it possible to show on open/forwarded session in KDE?

When I need to do some longer computation, I leave my computer unattended and just lock the screen. When I log in later to see how progress is going from a remote computer using ssh, it'd be great if ...
2
votes
1answer
2k views

Transparent Ethernet over GRE not forwarding traffic

I am running on Linux 2.6.30.9 and have been trying to setup a transparent ethernet over GRE tunnel. The network topology used is as follows: I want to bridge PC1 and PC2 using Transparent Ethernet ...
2
votes
1answer
392 views

In X11 SSH forwarding, keyboard isn't working properly (Only Ctrl + .. and numeric keypad works!)

I'm using Ubuntu 18.04 desktop at the office. In order to work with server, we're required to connect to a remote Windows 8 machine, and then open SSH connect to an Ubuntu 16.04 server from here. ...
1
vote
2answers
539 views

How to check if a packet reached an interface in a multi-interface context?

Consider the following topology: I am sending ICMP (ping) packets from host B to 10.0.1.1. They reach the target and the target answers with a reply. The connectivity works fine. When running, on ...
1
vote
2answers
112 views

Does OpenSSH >=7.2 support local-side tilde expansion for remote Unix socket forwarding

I am trying to forward a gpg-agent Unix socket to a remote machine. I have tried the following two versions of the remote forwarding command: A: ssh -vvv -N -R ~/.gnupg/S.gpg-agent:~/.gnupg/S.gpg-...
1
vote
1answer
752 views

Forward traffic to virtual interface based on source IP address dynamically using iptables

I'm experimenting DNS server setup that reply different results based on source IP address. and the same time I need to dynamically change what interface external source ip should forward, eth0 ...
1
vote
2answers
962 views

Sysctl Parameters accept_local and rp_filter Not Working on Dual-NIC Machine

root@host-3:~# uname -a Linux host-3 4.4.35-1-pve #1 SMP Fri Dec 9 11:09:55 CET 2016 x86_64 GNU/Linux root@host-3:~# cat /etc/debian_version 8.9 root@host-3:~# ifconfig eth0 Link encap:Ethernet ...
1
vote
2answers
3k views

Redirect mail adressed to specific address to individual mail servers - postfix

My current set up: mailserver1 mailserver2 (both serving the same domain) and user1 user2 I want do redirect all mails which are addressed to user1 to mailserver1 and the same for user2 to ...
1
vote
1answer
33 views

How to force ssh agent forwarding to continue in screen after you disconnect?

I want to connect to a host from which I will run ansible playbook using screen. Using screen allows me to have the playbook finish in case my ssh connection gets interrupted or terminated. So far no ...