New answers tagged

0

Solved my own problem, the question I had after "edit". Adding this rule to my Forward chain in iptables solved the issue iptables -A FORWARD -i br0 -o br0 -j ACCEPT


0

I had a similar problem, messed around for hours and hours until I found Pritunl (https://github.com/pritunl/pritunl), it uses OpenVPN but takes care of all the iptables headache that is needed for the routing you want and gives you a nice web GUI to manage clients, etc. Not the answer you might be looking for, but for me it was a pragmatic solution, ...


1

In addition to a proper iptables rule set, forwarding needs to be enabled in the kernel. Check the current setting (which defaults to disabled): cat /proc/sys/net/ipv4/ip_forward And if it disabled (0) then it can be enabled (non persistent) via: echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward or (still non persistent) via: sudo sysctl -w ...


1

From iptables --help: --numeric -n numeric output of addresses and ports http://serverfault.com/questions/85602/iptables-l-pretty-slow-is-this-normal Include the -n option so it doesn't try to use DNS to resolve names for every IP address, network and port. Then it will be fast. https://help.ubuntu.com/community/IptablesHowTo Allowing ...


2

Get host ip: host -t a facebook.com Find CIDR whois 173.252.120.68 | grep CIDR And block subnet iptables -A OUTPUT -p tcp -d 173.252.120.68/18 -j DROP and block domains: iptables -A OUTPUT -p tcp -d www.fаcebook.com -j DROP iptables -A OUTPUT -p tcp -d fаcebook.com -j DROP


0

It took me a while but I figured this one out and am currently VNC'ing into my ubuntu 12.04 box again from my ubuntu 12.04 desktop machine. Here's what I had to do. ufw (uncomplicated fire wall) and iptables are not persistent. So upon reboot all the trouble I took to only enable my desktop and laptop to log in remotely were disabled. Then I found my ...


0

I was looking for the exact same setup. I realize this is a late response but perhaps someone else can benefit from it. Note: My VPN connection is of type PPP and shows up as the interface ppp0 under ifconfig. TV: Configure the TV's network settings to use your machine's IP as default gateway. Ubuntu: Setup IP forwarding and NAT as follows on your ...


2

One alternative would be to block traffic using MAC address filtering. So, you would basically need to get the MAC address of the network interface you want to block, and then use an iptables rule such as the following: iptables -I INPUT -m mac --mac-source 1E:2B:65:48:54:AD -j REJECT The above rule will block all incoming traffic from the specified MAC ...


0

I suscess to try with commands: iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT --to-destination 192.168.2.1 iptables -A POSTROUTING -t nat -o ens37 -j MASQUERADE


0

If you're running Ubuntu and looking for local firewall configurations, instead of iptables, check out ufw (aka, Uncomplicated Firewall). It should be installed by default. To get started, try typing "sudo ufw --help"


0

After a bit of searching I figured out that I wanted to use a Bridge instead of IPTables. Otherwise, the connection would require another NAT/DHCP. The configuration of the Bridge is trivial, more detail can be found: https://help.ubuntu.com/community/NetworkConnectionBridge


2

Looking at your tshark capture and your routing table. I supposed that your vpn network is using the same subnet as the docker0 interface. This will shutdown the docker0 interface: sudo ifdown docker0 But the problem will come back after a reboot. To properly fix it you should remove docker, or change subnet settings of docker, or change your vpn ...


1

You have not provided a return path. You need: iptables -t nat -A POSTROUTING -o ens33 -j SNAT --to 192.168.1.5 I assume it is just a typo in your PREROUTING line, but regardless I would do it this way anyhow: iptables -t nat -A PREROUTING -p tcp -i ens33 --dport 80 -j DNAT --to-destination 192.168.2.2:80 If your default policy for the FORWARD chain is ...


0

If you want to just access the dashboard from your laptop you can use sshuttle: sshuttle ubuntu@<server_ip> -r 10.0.6.0/24 That'll let you load up your dashboard with the container IP. If you want something more substantial then configuring iptables is probably the way to go.



Top 50 recent answers are included