LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-20-2019, 11:51 AM   #1
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Rep: Reputation: Disabled
Why is static route being blocked by firewall?


I've been trying to get router to send specific traffic over to my server to go through an OpenVPN connection.

The OpenVPN connection is working fine; and I can use the server as a gateway with no problems.

I am however wanting to keep my router as my default gateway (Great GUI controls - Asus Merlin), so to do this; I've configured an ip table with a default route...

Quote:
ip route add default via 192.168.1.2 table ovpn
ip rule add from 192.168.1.15 table ovpn
My server also has some routes

Quote:
ip route add default dev tun0 table vpn
ip rule add from 192.168.1.2 table main pref 1
ip rule add from 192.168.1.0/24 table vpn pref 2

Now; I can see that ping and tracert/traceroute are working correctly; however my web browser does not work. I did discover that disabling the windows firewall made this work no problem. It also works on other devices, so guessing it must be just a windows thing

Can anybody suggest why this would be the case? And how I could get around it (ideally without having to configure firewalls across several machines)

Cheers

Last edited by anon059; 02-20-2019 at 11:53 AM. Reason: Style
 
Old 02-21-2019, 02:43 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
What's your network topology, default gateway, server and window machine?
 
Old 02-21-2019, 05:27 PM   #3
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
What's your network topology, default gateway, server and window machine?
Quick picture attached. Hopefully should help

Click image for larger version

Name:	Topology.png
Views:	453
Size:	14.1 KB
ID:	29884
 
Old 02-22-2019, 11:42 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Yep, it does. VPNs don't allow back doors - nohow. If you use the vpn, route everything through it.
 
Old 02-22-2019, 02:08 PM   #5
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Yep, it does. VPNs don't allow back doors - nohow. If you use the vpn, route everything through it.
Not sure what you mean by backdoor?

However VPN traffic can be selectively routed. I have this working on a different network. This time with a openwrt router; but it does selectively route traffic
 
Old 02-22-2019, 03:34 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
You need use iptable tool to specify IPSec tunnel traffic, not ip rule.
 
Old 02-22-2019, 06:10 PM   #7
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
attempts

I've using iptables to mark the packets and route them accordingly with ip rule

Code:
e.g. iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.xx.xxx -j MARK --set-mark 0
which works the same as the basic ip rule (routes via vpn server, and through the tunnel, however windows 10 firewall blocks. Everything else works)

Also tried..forwarding with iptables prerouting, postrouting dnat, snat; couldn't get these to work in any way
 
Old 02-23-2019, 04:06 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,251

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
A backdoor is a security breach, because traffic can get in/out unencrypted. Guys have suggestions. Try them.
 
Old 02-23-2019, 08:29 PM   #9
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
You need use iptable tool to specify IPSec tunnel traffic, not ip rule.
Do you have any more information on how to do this?

Going round in circles
 
Old 02-26-2019, 02:46 PM   #10
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Following link could help you, https://community.openvpn.net/openvp...gingAndRouting
 
Old 02-26-2019, 07:08 PM   #11
anon059
LQ Newbie
 
Registered: May 2018
Posts: 14

Original Poster
Rep: Reputation: Disabled
Nothing on there that I am not already doing;

As I said, it is working apart from windows firewall blocking it.

After lots of messing around, I think you were right with the backdoor/IP Sec stuff; because with the same settings I am I able to have it working with a PPTP tunnel between the router and the VPN Client. Even with no encryption.

I could not get this to work with a OpenVPN tunnel; though this may be to do with the peculiar ASUS implementation

Problem with this is; PPTP server is notoriously unsafe, and would have to configure additional rules etc to block it externally
 
Old 02-27-2019, 02:26 PM   #12
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Although the issue is gone after firewall is off on Window machine, it still is dependant on traffic path, what device is walked through.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet going out of wrong interface due to OS adding cache route - OS trying to route through default route msr1981 Linux - Networking 2 10-11-2017 02:58 PM
Packet going out of wrong interface due to OS adding cache route - OS trying to route through default route msr1981 Red Hat 1 10-09-2017 05:45 AM
Why static routes set using 'ip route add' and 'route add' commands are not used for routing packets within the same network? kanak@tetcos.com Linux - Networking 7 04-25-2017 05:52 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration