New user of Opnsense need some assitance with forwarding

Started by Galactic, October 06, 2022, 11:09:39 PM

Previous topic - Next topic
Hi All

Thought i would try out this opnsense to make some of my workers happier to have a gui but for the life of me i cannot work the following

I have a current ubuntu server that i have created IP Table Rules to route traffic to openVPN Clients and from IP Addresses but i cant seem to get the same result in Opn Sense

The Server has 1 Static WAN ADDRESS and 3 Alias

Also for your information -  We are ifconfig-push a IP to the client so when they connect they obtain the same IP

Please see below what i have in my IP TABLE Rules that i need to replicate in opnsense

iptables -t nat -A PREROUTING -i eth0 -d {IP ALIAS 1} -p tcp --dport 1:64000 -j DNAT --to {OPENVPN CLIENT}:1-64000

iptables -t nat -A PREROUTING -i eth0 -d {IP ALIAS 1} -p udp --dport 1:64000 -j DNAT --to {OPENVPN CLIENT}:1-64000

iptables -t nat -A POSTROUTING -s { OPENVPN Push IP } -j SNAT --to-source [Alias IP 1]

With Alias 2 it will be the same but the Alias 2 IP and a differnt Openvpn push IP

Hope this makes sense

I think you are looking for the outbound NAT located under> Firewall: NAT: Outbound
You want Manual or Hybrid rules (if you want some auto help), and it should give you everything you need.