[ufw] force all traffic through VPN


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers [ufw] force all traffic through VPN
# 1  
Old 03-17-2019
[ufw] force all traffic through VPN

I am trying to force all my tun0's traffic through VPN but some some reason, the ufw is not working the way I want to.

Below are the commands that I have executed.. I am able to connect to my SSH and NFS server but for some reason that I am unable to understand, I am unable to surf the net.
What am I missing?

Code:
sudo echo "y" ufw reset
sudo ufw logging off
sudo ufw default deny incoming
sudo ufw default deny outgoing

#Force all VPN traffic to tun0
sudo ufw allow out on tun0 from any to any

#SSH
sudo ufw allow out on enp6s0 to ssh_ip_server port XX proto tcp

#NFS
sudo ufw allow out on enp6s0 to nfs_server_ip port xxx
sudo ufw allow out on enp6s0 to nfs_server_ip port xxx
sudo ufw allow out on enp6s0 to nfs_server_ip port xxx

sudo ufw enable

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Linux keeps freezing on UFW BLOCK

Hi everyone, I have had trouble getting several versions of Linux stable on my machine over the last few months. I do not think the issue is with the machine. Windows ran fine on it for a long time. The current issue is that whenever I lock the screen then come back after a long time I find... (2 Replies)
Discussion started by: mojoman
2 Replies

2. Solaris

Vpn

Hi. Yesterday I installed Solaris 11.3 and I tried to setup a VPN but I didn't find how to make it. I saw the "network manager" where I found the ethernet connection but I didn't find where to add a VPN connection. When I used Debian Linux there was NetworkManagerVPN that with a GUI I... (0 Replies)
Discussion started by: Jena
0 Replies

3. Ubuntu

ubuntu kernel: [ 729.529501] [UFW ALLOW] ,[UFW AUDIT]

Hi , In our ubuntu server 10.10 ,we are getting below logs .Every day i need to restart server ,other wise it will not accessible.Some times ,i need to restart two times. When i ping google.com ,it was very slow .some times host not reachable .After reboot ,it will ping as good. ... (0 Replies)
Discussion started by: srinivasa
0 Replies

4. UNIX for Dummies Questions & Answers

Ubuntu 9.10 FIrewall--is UFW allowing anything through by default?

Hi, I have enabled my UBUNTU 9.10 ufw. By default does it let anything through? I would think it allows all outbound originating requests through and allows for their return but it does not allow any inbound requests. Is this how it works? ---------- Post updated at 08:17 PM ----------... (1 Reply)
Discussion started by: mojoman
1 Replies

5. UNIX for Dummies Questions & Answers

UFW show args command

In ubuntu man page there is this command. What are values of ARGS I can use? (0 Replies)
Discussion started by: mojoman
0 Replies

6. HP-UX

how to force umount

sorry, wrong section, mod please close thread (0 Replies)
Discussion started by: robertngo
0 Replies

7. UNIX for Advanced & Expert Users

VPN and then

Hi, I want to work on a remote unix server, then on a windows XP station I have a Forticlient that makes a VPN to the network on which the server is situated. But then I do not know how to work with. In DOS box (cmd BOX) I issue: telnet myserver but It does not know IT. Any idea ? Many thanks. (2 Replies)
Discussion started by: big123456
2 Replies

8. IP Networking

Vpn

Hi, I have two unix networks connected via VPN via IPsec. I am using snapgear vpn devices at each location. The two devices can ping one another, as well as the unix network behind the respected devices. The unix machines can ping their local vpn devices. However, I am having issues pinging... (1 Reply)
Discussion started by: l8kerboi23
1 Replies

9. UNIX for Dummies Questions & Answers

help with vpn

We have an older model DG Aviion Unix system and we're trying to switch to VPN but we can't talk to the Unix box... can't ping or telnet to it, but we can talk to all our other systems (PC/NT servers). Is there a network/tcpip setting we're missing? Something we have to change/set, either on... (0 Replies)
Discussion started by: markb
0 Replies
Login or Register to Ask a Question
RACOON-TOOL(8)						      System Manager's Manual						    RACOON-TOOL(8)

NAME
racoon-tool - program to manage the racoon(8) IPSEC IKE daemon. SYNOPSIS
racoon-tool [-h] reload|restart|force-reload|start|stop racoon-tool [-h] sadflush|spdflush|saddump|spddump racoon-tool [-h] vpndown|vdown|vpnup|vup connection-name|all racoon-tool [-h] vpnreload|vreload connection-name|all racoon-tool [-h] vpnlist|vlist [connection-name|all] racoon-tool [-h] vpnmenu|vmenu [connection-name-regexp] racoon-tool [-h] racoonstart|racoonstop|rstart|rstop DESCRIPTION
This manual page documents briefly the racoon-tool command. racoon-tool(8) is a perl script that can be used to control the racoon(8) IKE daemon and the SPD database within the kernel via the setkey(8) command. Various operations that it can do are described below. You can also optionally choose not to use it via reconfiguring the racoon package using dpkg-reconfigure(8). OPTIONS
A summary of options are included below. -h Show summary of options. COMMANDS
start Start racoon(8), loading any needed modules, configuring the SPD, and generating a configuration from /etc/racoon/racoon-tool.conf (head) and following up with *.conf files from /etc/racoon/racoon-tool.conf.d/. stop Stop racoon(8) unloading any crypto/IPSEC modules, flushing the SAD and SPD. reload Regenerate configuration from /etc/racoon/racoon.conf, and /etc/racoon/racoon.conf.d/, HUP racoon(8) and reinitialise the SPD and SAD. restart|force-reload Perform a stop followed by a start sadflush Flush the SAD via setkey(8). spdflush Flush the SPD via setkey(8). saddump|dump Dump the SAD to screen via setkey(8), paginating via your pager. spddump Dump the SPD to screen via setkey(8), paginating via your pager. vpnup|vup connection-name|all Bring up the VPN connection(s). vpndown|vdown connection-name|all Take down the VPN connection(s). vpnreload|vreload connection-name|all Reload the VPN connection(s). vpnlist|vlist [connection-name|all] List the known VPN connections in /etc/racoon/racoon-tool.conf, etc. Can be used by a script or administrator to see if a VPN con- nection exists. vpnmenu|vmenu [connection-name-regexp] Start the VPN menu management mode. This displays the SPD, and you can shutdown VPNs from here. Latter on support will be added for checking status and reloading the chosen connection. racoonstart|rstart Start only the racoon(8) daemon. racoonstop|rstop Stop only the racoon(8) daemon. FILES
/etc/racoon/racoon-tool.conf - configuration file (head). /etc/racoon/racoon-tool.conf.d - configuration file segment directory read after the above. /var/lib/racoon/racoon.conf - generated racoon.conf SEE ALSO
racoon(8), racoon.conf(5), setkey(8), racoon-tool.conf(5). AUTHOR
This manual page was written by Matthew Grant <matthewgrant5@gmail.com>, for the Debian GNU/Linux system (but may be used by others). RACOON-TOOL(8)