0

I have found that answer:

How to allow SSH into Terminal after connecting to VPN server using NordVPN servers through OpenVPN?

ip rule add from x.x.x.x table 128
ip route add table 128 to y.y.y.y/y dev eth0
ip route add table 128 default via z.z.z.z

Where x.x.x.x is your Server public IP, y.y.y.y/y should be the subnet of your Server public IP address, eth0 should be your Server public Ethernet interface z.z.z.z should be the default gateway.

How can I find these values ? (x.x.x.x / y.y.y.y/y / eth0 / z.z.z.z) ?

ifconfig
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 51.15.170.195  netmask 255.255.255.0  broadcast 51.15.170.255
        inet6 fe80::208:a2ff:fe0b:3e12  prefixlen 64  scopeid 0x20<link>
        ether 00:08:a2:0b:3e:12  txqueuelen 1000  (Ethernet)
        RX packets 5029  bytes 1043720 (1019.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1143  bytes 164109 (160.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xdfe00000-dfe7ffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 30  bytes 2541 (2.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30  bytes 2541 (2.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


ip r
default via 51.15.170.1 dev enp1s0
51.15.170.0/24 dev enp1s0 proto kernel scope link src 51.15.170.195
yarek
  • 101
  • 3
  • 1
    Use `ip a` command at your server. Usually the subnetmask is 255.255.255.255 for single public IP. – paladin Oct 07 '21 at 11:17
  • 1
    I suggest looking into the basics of IPv4 and subnetting, otherwise you will mess up sooner or later. – Panki Oct 07 '21 at 11:31
  • This is a bit unclear. Have you found an answer to your question? If yes, please post an actual answer and accept it instead of editing the question. That way this will be available in future searches as a solution for this issue. – Peregrino69 Oct 07 '21 at 13:03

0 Answers0