36 votes
Accepted

Linux iptables rejected - How do I enable it back?

IPtables has a list of rules, and for each packet, it checks the list of rules in order. Once a rule is found that matches the packet and specifies a policy (ACCEPT, REJECT, DROP), the fate of the ...
  • 27.4k
32 votes
Accepted

Forward the root domain to the www subdomain using DNS records

Unfortunately, this is a well-known shortcoming of the DNS protocol. There is no record type defined within the DNS standards that will allow you to alias the apex of a domain. Many people assume that ...
  • 32k
19 votes

How to properly configure BIND forward zone for an internal DNS server?

Add a 'forward only;' statement to the forwarded zone: zone "subzone.mydns.example.com" { type forward; forward only; forwarders { 192.168.0.4; }; };
18 votes

Linux iptables rejected - How do I enable it back?

The -A flag tells iptables to append the rule to the chain, meaning it ends up under your REJECT rule, and since the first rule matches, it's never used. You list your rules with iptables -L FORWARD ...
  • 3,403
14 votes

Why is ssh agent forwarding not working?

Another possible reason is connection sharing: one might already be logged in on the other host without agent forwarding and connection sharing enabled. The second login with ssh -A (or equivalently ...
  • 241
12 votes

Forward the root domain to the www subdomain using DNS records

Summary: In short, you can't have the record you want, and your DNS host is doing things The Right Way. Explanation: It is a violation of the DNS standadards to have a CNAME (alias record / forward ...
  • 1,708
11 votes
Accepted

Accessing to a remote PostgreSQL server using port forwarding to another machine

This command: ssh -L 54320:Server_A:5432 user@Server_B looks good, but then when doing this: psql -p 54320 -d db_name -U user the ssh tunnel is not used, because by default on Unix, psql connects ...
9 votes

e1000e Reset adapter unexpectedly / Detected Hardware Unit Hang

Disabling Enhanced C1 (C1E) in the BIOS fixed it for me. Not sure if the lower power state of C1E is messing with the driver, or that there's an oops in the driver when the processor is in this state....
  • 91
8 votes
Accepted

host port forward with qemu through libvirt in user-mode networking

the missing part from your configuration is described here: https://www.linux-kvm.org/page/Networking. You have to add another netdev with new address like so: <domain type='kvm' xmlns:qemu='http:/...
  • 96
7 votes

iptables redirect local connections to remote system / port

Here is what I do specifically for localhost forwarding: iptables -t nat -A OUTPUT -m addrtype --src-type LOCAL --dst-type LOCAL -p tcp --dport 3306 -j DNAT --to-destination ip.ip.ip.ip iptables -t ...
7 votes

Why is ssh agent forwarding not working?

I had problem with sshd server rejecting agent forwarding request because of no space left in /tmp. This was because sshd needs to create socket in /tmp. Cleaning disk up resolved my issue. ssh -v ...
7 votes

e1000e Reset adapter unexpectedly / Detected Hardware Unit Hang

Disabling only TCP Segmentation Offload (TSO) does the trick for me. ethtool -K eth0 tso off Note: It does not seem to be necessary to also disable Generic Receive Offload (GRO) and Generic ...
7 votes
Accepted

Mail forwarding server

Is there any way I can "relay" mail traffic? Yes. Is there any way this is possible, and if so how? This is generally known as a mail "smarthost", and it is a very frequent use case. You'll need ...
  • 109k
6 votes
Accepted

Postfix as email forwarder to gmail, SPF problems

I fixed this with postsrsd by following this guide: https://www.mind-it.info/forward-postfix-spf-srs/ In short: Download and compile the software cd ~ wget https://github.com/roehling/postsrsd/...
  • 243
6 votes

Iptables udp port forwarding

You need to use the PREROUTING chain to forward port : iptables -t nat -A PREROUTING -p udp -i eth0 -d 192.168.1.2 --dport 1003 -j DNAT --to-destination 192.168.1.2:1004 By the way, it seems filter ...
  • 12.9k
5 votes

ssh-agent forwarding and sudo to another user

Combining information from the other answers I came up with this: user=app setfacl -m $user:x $(dirname "$SSH_AUTH_SOCK") setfacl -m $user:rwx "$SSH_AUTH_SOCK" sudo SSH_AUTH_SOCK="$SSH_AUTH_SOCK" -u $...
  • 308
5 votes
Accepted

IPv6 PPP Link fails forwarding Router Advertisements into local LAN

Router advertisements are not supposed to be forwarded. So when you find that they are not being forwarded, then at least that part is working as intended. You are supposed to be running your own ...
  • 30k
5 votes

How do you configure BIND to forward reverse DNS queries to another DNS server?

The output of DIG led me to discover the issue dig -x 10.60.10.200 ; <<>> DiG 9.9.5-9+deb8u6-Debian <<>> -x 10.60.10.200 ;; global options: +cmd ;; Got answer: ;; ->>...
5 votes

Forwarded connection refused by server: Administratively prohibited. Using both @IP and PermitOpen

Well this is embarrassing. Apparently I had the incorrect syntax for PermitOpen. I found that if you list multiple lines of PermitOpen only the first line is actually active. The correct syntax: ...
  • 51
5 votes

Forwarding port 80 traffic to multiple Web servers behind the firewall

This cannot be done with IPTables. This is because the destination server is included in the HTTP request header field. The first part of TCP connection is handshake, which sets up the connection ...
4 votes

Why is ssh agent forwarding not working?

For me, it was simply that the host I was connecting to (b1 in the original poster's example) was running it's own persistent ssh-agent. There's no debug output I could see to explain what was ...
4 votes

Why is ssh agent forwarding not working?

For the benefit of other googlers who also arrived at this question: Incorrect whitespace in a ~/.ssh/config file can also cause some head scratching. I recently helped out one of my co-workers who ...
4 votes

Difference between routing and forwarding table

First of all, in my point of view, I think you should first clearly understand the distinction between forwarding and routing, which is often neglected. According to the book Computer Networks in page ...
  • 141
4 votes

Forward the root domain to the www subdomain using DNS records

Some protocols have standards for DNS record types, other than A records, for finding the service. SMTP with it's associated MX records is a good example of this. There are no defined DNS record ...
4 votes

Postfix forwards to Gmail being rate limited even with unmodified headers

Short answer Do not forward spam. Reject it or Drop it before forwarding. Long answer GMail hates spam as much as you do. So Gmail began to rate limiting your server because your server who throwing ...
  • 18.1k
4 votes
Accepted

What is the bind address used for when forwarding a port via SSH?

What is that bind address good for? If you have multiple local IP addresses, you can choose one of them to bind the port to.
  • 109k
4 votes
Accepted

How to merge usb0 and usb1 interfaces into one network?

What you need is to configure bridging. What bridging will do, is basically tie together a bunch of interfaces, and then letting the computer running the bridge act as a switch. The IP address is ...
4 votes
Accepted

Forward traffic from one process only

We need to intercept the P2 connection to localhost TCP/50000 and forward it to the PROXY listening on TCP/8080 - The PROXY has to be configured to forward the request to LOCALHOST TCP/5000. For this ...
4 votes

Linux IP-tables Forwarding loose Source IP on access.log

The -j MASQUERADE rules in your config instruct the kernel to rewrite the source ip-address of packets to the ip-address on the interface the packet uses to exit your system (also know as Source NAT)....
  • 73k
4 votes
Accepted

ssh forwarding to master/slave nodes

Agent forwarding enables the "middle" ssh server to forward the key you're using to the next server you're contacting. It doesn't magically make the next server decide to allow that key access. Like ...
  • 27.4k

Only top scored, non community-wiki answers of a minimum length are eligible